By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,786 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,786 IT Pros & Developers. It's quick & easy.

VB.Net-Database Connection Error

P: 71
Hi all,
Im new to .net. When i tried to connect database using the below code an error came as Instance Failure. Pls Help Me.

con = New SqlConnection("Data source=.\\SQLEXPRESS;AttachDbFilename=\C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Classif.mdf\;Integrated Security=True;User Instance=True")

Thank U
Jeen
Oct 10 '07 #1
Share this Question
Share on Google+
3 Replies


P: 73
Hi,

try to drag and drop a sqldatasource in you webform and then do the wizards of connecting to the datasource...
copy the connection string once you're done.

regards,
ruel





Hi all,
Im new to .net. When i tried to connect database using the below code an error came as Instance Failure. Pls Help Me.

con = New SqlConnection("Data source=.\\SQLEXPRESS;AttachDbFilename=\C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\Classif.mdf\;Integrated Security=True;User Instance=True")

Thank U
Jeen
Oct 10 '07 #2

P: 71
Thanks for ur reply. But i have to do write as code.

jeen
Oct 10 '07 #3

P: 71
Thanks that my problem is solved
Oct 10 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.