Hi,
I want to know what is the connection string for ADO.Net
I have used this one
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=patient;uid=sa;pwd=;");
but it is throwing some sql execption,
any suggestions
Thanks in Advance,
A.Durga Prasad
Loading

Bechir BejaouiRank #144 · 15.9K reputationPosted Mar 20, 2009, 2:03 AM EDT
To connect to 2005 sql server
To connect to an Sql server compact edition for pocket PC
Blocked AccountRank #403 · 6.2K reputationPosted Mar 20, 2009, 1:56 AM EDT
Hi,
Try this
SqlConnection con = new SqlConnection("Server=.;Database=patient;uid=sa;pwd=;");
durga prasad36 reputationPosted Mar 20, 2009, 2:25 AM EDT
SqlConnection con = new SqlConnection("Server=.\\SQLExpress;Database=patient;uid=sa;pwd=;");
Bechir BejaouiRank #144 · 15.9K reputationPosted Mar 20, 2009, 3:11 AM EDT
I suppose here to get the connection string to an access bata base which is located in C:\
Download this file it contains a small video that I have done for you to show you how to to this
http://rapidshare.com/files/211385845/getTheRightConnectionstring.zip.html
The exactly same procedure could be done for SQL server express edition except that you have to enter user id and password in case of SQL server
after the connection succed you expand the tag + of the connection string section and then you copy the connection string using the mouse finally you can use it within your code without worrying about it will works or won' t work d ;-)
geetha velusamy52 reputationPosted Nov 11, 2021, 7:58 AM EST