문제

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.

도움이 되었습니까?

해결책

If the data is user specific

Environment.SpecialFolder.ApplicationData 

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

Environment.SpecialFolder.CommonApplicationData
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top