Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Experts,

I've a application, in which I'm connecting to sdf db file. If i install my application in "C:\Program File" my application is not able to connect to database. Its giving error that failing to connect to database. But if i install same application in some other drive e.g. D or E, then its able to connect to DB.

How can i grant access in C:\Program file in windows 7?

Thank you all.

Regards,
Vidi
Posted

1 solution

"Program Files" is protected by Windows. You have to use another folder for saving your data, read here : http://stackoverflow.com/questions/867485/c-sharp-getting-the-path-of-appdata[^]
 
Share this answer
 
Comments
vidiking 21-Sep-12 4:34am    
Thank you Mehdi Gholam. Its working fine.
Mehdi Gholam 21-Sep-12 4:40am    
Great!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900