Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I want to change Mode of connectivity in Typed Dataset. But I can not change the connection string. I want it from Read / Write (default mode) to Exclusive to be used on Shared network.

In this topic, you will learn how to set the file mode when you open a Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) database. To set the mode in which the database is opened, you use the mode property in the connection string. The following table defines the valid values for the file mode:

I found following on MS documentation: Value Definition Read/Write Permits multiple processes to open and modify the database. Read Only Lets you open a read-only copy of the database. Exclusive Does not permit other processes to open or modify the database. Shared Read Permits other processes to read, but not modify, the database while you have it open. Note: If you are opening a database that is located on a file share, use the Exclusive file mode.
Posted

1 solution

Since you obviously got your information from here(MSDN)[^], try reading to the bottom of the page to the code example. The answer you are looking for is right there for you. I'm not going to copy-paste the answer to your homework here, doing the actual "work" is for you.
 
Share this answer
 
Comments
Espen Harlinn 10-Jan-12 16:01pm    
My 5 - the required info is right there :)

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