Click here to Skip to main content
16,011,930 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone,

i want solution urgent. i am developing C# with MS Sql server Compact database. i have trouble with Multi user access in the database.'m using sharing concept but its giving error :

There is a file sharing violation. A different process might be using the file.[\\JAN-941C126E\Testing_GSm\Debug\\New\GSM.sdf]

any other solution?

please urgent..

thanks & regards
Posted
Updated 17-Feb-14 19:41pm
v2

1 solution

Please make sure that the First connection to the database is not opened in an Exclusive mode.
Multi-connection acces details can be found here[^].

source : MSDN[^]

-KR
 
Share this answer
 
Comments
Brinda Arumugam 18-Feb-14 2:17am    
Tnks for reply :)

already I tried following Code:

SqlCeConnection con = new SqlCeConnection("Data Source=" + AppDomain.CurrentDomain.BaseDirectory + "\\New\\GSM.sdf;" + "Mode = Read Write"); but its also not working..

can u give some c# example coding for this....

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