Link to home
Start Free TrialLog in
Avatar of npnp
npnp

asked on

SQL Server does not exist

I'm learning .NET -- When running a little database test application I catch the error message "SQL Server does not exist or access denied".  With a "0" in the title bar.

Assuming the first half of the message applies, is this a "Imports" issue?  Where can I find a catalog of "Imports"?  Here is my current Imports list:

Imports System.IO
Imports System.Windows.Forms
Imports System.Data
Imports System.Data.SqlClient (added this last one, but it didn't help).

Assuming the second half of the message applies, this is my connection string:

strConn &= "Data Source=(local): "
strConn &= "Initial Catalog=C:\Inspec32\ISIdatabase.mdb; "
strConn &= "User ID=sa; "
strConn &= "Password='MACHUPICHU'; "

I tried it with and without the single quotes around the password.  The password works if I directly access the database.

Please help -- Norm
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thenrich
thenrich

try using the above code but instead of this:

Imports System.Data.SqlClient (added this last one, but it didn't help). use this

Imports System.Data.OleDb

SQLClient is specific to SQL server.
Avatar of npnp

ASKER

Yes, you are absolutely correct.
For which I thank you.

After I got that working, I ran into another problem, which I posted on this site as another question.  At the program line

....Connection.Open()

I catch a message; "...workgroup information file is missing".

-- Norm
Avatar of npnp

ASKER

And thank you to thenrich for that important item. -- Norm