Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I don't have so much experience on DBMS. I made a program with C# that uses SQL-CE as database, it works perfect, but I want to use shared database with my friend. When I moved to database sdf file to shared folders when I insert or update a row it gives an exception;

There is a file sharing violation. A different proccess might be using the file.

Here's my connection string:

C#
System.Data.SqlServerCe.SqlCeConnection vcon = new System.Data.SqlServerCe.SqlCeConnection("Data Source=" + DBPath);


Can you suggest me a way to share a database?(embedded or not) A tutorial could be awesome cuz I'm beginner.

Thank you.
Posted

don't use SQL-CE. this is not for such things. you need a database server which serves as data source over a network :) search google with "database server"
 
Share this answer
 
Comments
Emre Ataseven 28-Jan-14 17:13pm    
There will be only 2 users nothing more. Isn't installing database server too much for this purpose? What about Ms Access? Could it be used as shared? Thank you.
Vedat Ozan Oner 29-Jan-14 3:22am    
It is not about the number of users, it is about how. sql-ce db is just a file. it becomes meaningful when your process loads related drivers and reads the content of sql-ce file, so it is suitable for mobile device applications. a server stores data, but it also manages data, data access, security, integrity etc, when many (more than 1) users are included, which is your case.
SQL-CE runs in-process and is NOT for shared DB applications. (More for kiosk or stand-alone applications.)
SQL Server Express is the free edition of SQL Server:
Download SQL Server 2012 Express with SP1[^]
 
Share this answer
 

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