sql-2005 connection string,any body tell me

Posted by Umeshdwivedi under Sql Server on 4/27/2011 | Points: 10 | Views : 1556 | Status : [Member] | Replies : 2
dear all,
any body tell me sql-server 2005 connection string,step by step

Latest Technology Trainer
And Part time software consultant


Posted by: Ndebata on: 4/27/2011 [Member] Starter | Points: 25

The typical structure of a sql connection string is as follows.

Data Source=abc ;Initial Catalog=dbname;User ID=xyz ;Password= *****;Persist Security Info=False;

Here Data Source is the Dbserver Name or you can provide ipaddress of the same
Initial Catalog is database name which you want to connect.
Persist Security Info The .NET Framework Data Provider for SQL Server does not persist or return the password in a connection string if it set as false [default value is false]
Incase you going to connect the sql server using youe windows authentication instead of userid and password you can set it as
Integrated Security=sspi or true;

Data Source=abc ;Initial Catalog=dbname;Integrated Security=sspi;

Please note these are the basic things required to make a connection with sql server. You also set some advance settings line connection time out etc.
There are many synonym exits like you can user UID instead of User ID or pwd instead of Password.

To know more about this take a look at the msdn link bellow

Umeshdwivedi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 4/28/2011 [Member] Bronze | Points: 25

Hi umesh.....

chk out this links....



I hope this helps....

Umeshdwivedi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response