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\ISIdat abase.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
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\ISIdat
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
And thank you to thenrich for that important item. -- Norm
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.