Question

I have an application that run on diffident OS version like(win XP,win 7,win 8). I have a .sdf data base with read-only access,i used Environment.SpecialFolder.Templates for temp path.

Temp Path= Environment.GetFolderPath(Environment.SpecialFolder.Templates)

It's work fine on win 7 ,but return error(permission denied) on win XP and win 8.

So i want to ask "What’s the recommended location for Application database in different Os version ?" Thanks in advance.

Était-ce utile?

La solution

If the data is user specific

Environment.SpecialFolder.ApplicationData 

Else if the data is shared by all users of the application

Environment.SpecialFolder.CommonApplicationData
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top