Click here to Skip to main content
15,796,299 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

I have created one application VS 2008 and SQL SERVER 2005 as backend. In database i have some primary key but they all are auto generated as I have true the Identity option of database in that. Now i would like to make it as multiuser. So for that what should i do? Does i need to change the database for multi user or not? Because i have used in built auto generate option does it require table or row level locking for mulit user environment or not? If it does not require table or row level locks then if i put the EXE of the application on different machines connected on LAN, is it require any change in database connection string? I have putted connection string in app.config file of my application.

Please help me if anyone has knowledge about this....

Thank you
Updated 8-Apr-11 22:37pm

You may need to change the connection string, but probably not if they are all connected on the same LAN and in the same domain (MSHOME, or WORKGROUP tend to be the defaults). In any case, this should be in you app.config file, so that should not be a problem.

If you are using Identity fields as your Primary Key then the database will assign them and there should be no need to do any locking when entering new records. You may want to do row locking when you use UPDATE commands though, and consider using transactions if you are inserting or updating a group of records.

Otherwise, MsSQL should handle multi-user without you noticing, until you get to significant numbers of users, that is!
Share this answer
Sql Server is a multi user database by nature. Unless you have deliberately put the database into single user mode other users can connect to it.

The connection string defines how to find the Sql Server from your machine. So most likely you have to change the connection string to include the new server name. For info about connection strings, see:[^]

Locking is a big area and the part you should take care of in the beginning is transactions. Locking is handled automatically for you. Have a look at this[^]. That would give some basic info about transaction handling.
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