Neel Desai
Neel Desai

Reputation: 459

Careful steps to connect to a SQL Server 2005 database using vb.Net (windows forms application) on server

Is it possible??

How can I write a connection string ????

I has four different computer that can be connect via ethernet.

How can I maintain a inserting data if to computer insert on same table at a single time..??

Can any one help me????

Upvotes: 1

Views: 1054

Answers (1)

marc_s
marc_s

Reputation: 754598

Check out www.connectionstrings.com for a vast array of connection strings and what they mean and what you can tweak about them.

Basically, you need:

  • the name of the server machine
  • the name of the database
  • how your security is set up

If your app runs on the same machine as the SQL Server, then you can use (local) or . (yes, just a dot) as your machine name.

Your database : well, that's totally up to you. What did you call it??

Security: if you're in a Windows environment, you should try to use "Windows Integrated Security", e.g. authenticate against your SQL Server with your Windows credentials.

In this case, your connection string would look something like:

server=(local);database=WhateverYouCalledIt;Integrated Security=SSPI;

Don't worry about quasi-simultaneous inserts - SQL Server is very good at handling those kind of scenarios.

Upvotes: 2

Related Questions