Question Connecting multiple clients to single DB

msheridan69

New member
Joined
Jul 20, 2009
Messages
2
Programming Experience
10+
Hi,

I've written a small auction app and I'd like to know the best way to connect several instances of the auction app to a single DB on the 'main' machine.

All clients will have .NET 3.5 installed, XP or Vista OS, and a local version of my Winform application. I'd prefer not to have to install any more software such as SQL Express if possible.

My machine, the will act as the DB machine. It has SQL Server 2005 installed and it contains the application's DB.

How do I get the application instances on each of the clients to connect to the DB on my machine? Do I simply provide my machine name or IP in the connection string in each machine's app.config?

Currently my connection string is using Trusted Login and windows authentication to connect to SQL Server. I'd like to create a generic user that I can use in the connection strings for clients. How do i set it up so a generic user, say auctionguest can connect to SQL.

apologies if this is really basic stuff :-(

All help, examples etc appreciated cheers,
 
How do I get the application instances on each of the clients to connect to the DB on my machine? Do I simply provide my machine name or IP in the connection string in each machine's app.config?
Pretty much. You would probably store the entire connection string in the config file and then, if the database ever moves, each client would edit their config file. You might choose to store the individual parts of the connection string separately and build the connection string in code. [ame="http://www.vbforums.com/showthread.php?t=532768"]Here[/ame]'s an example that shows both options.
Currently my connection string is using Trusted Login and windows authentication to connect to SQL Server. I'd like to create a generic user that I can use in the connection strings for clients. How do i set it up so a generic user, say auctionguest can connect to SQL.
That's something you would do in SQL Server Management Studio Express under the Security node for your database, but database management goes beyond the scope of a VB.NET forum.
 

Latest posts

Back
Top