Click here to Skip to main content
15,911,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I am using asp.net 2.0 with c# & sql server.

when user logins to my website i want to access the users local database, all user having the same database name, same tables every thing but they are not connected in network.
so i want to know how to get the data source value in the connection string for that user, so that i can acess his local database.

can you give example which helps me
Posted
Updated 9-Jul-10 22:22pm
v2

1 solution

Well, when eveything like databse, table scehma are same. When the database is not on network and only accessed locally, then you dont have to do much of a coding.

Just use "." (a dot) OR "localhost" in the datasource of the connection string (pre-defined)! That should do.
 
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