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 BejaouiPosted Mar 20, 2009, 6:03 AM
To connect to 2005 sql server
To connect to an Sql server compact edition for pocket PC
geetha velusamyPosted Nov 11, 2021, 12:58 PM
Bechir BejaouiPosted Mar 20, 2009, 7:11 AM
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 ;-)
durga prasadPosted Mar 20, 2009, 6:25 AM
SqlConnection con = new SqlConnection("Server=.\\SQLExpress;Database=patient;uid=sa;pwd=;");
Blocked AccountPosted Mar 20, 2009, 5:56 AM
Hi,
Try this
SqlConnection con = new SqlConnection("Server=.;Database=patient;uid=sa;pwd=;");