I cannot connect to SQL Server Express using VB.NET

Posted by konin on Stack Overflow See other posts from Stack Overflow or by konin
Published on 2010-01-17T16:56:41Z Indexed on 2010/04/05 1:33 UTC
Read the original article Hit count: 303

Can someone tell me what I am missing? I am using this connection string to connect to my database and still it won't connect:

Dim str As String = "Provider = .NET Framework Data Provider for SQL Server; Data Source=C:\Users\konin\Documents\UHMS\bin\Debug\UHMS.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"

This is the process I used to get the data source:

  1. right-click the database
  2. select properties and click select data source

I hope I am clear enough. Thanks for reading.

Edit:

Error Message is as follows:

unable to connect to database please contact administrator

© Stack Overflow or respective owner

Related posts about sql-server-express

Related posts about vb.net