开发者

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开发者_C百科 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????


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜