Solved

SQL Server does not exist

Posted on 2002-07-17
4
212 Views
Last Modified: 2010-04-14
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
0
Comment
Question by:npnp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 50 total points
ID: 7160472
You are using Access?

You better use this:

' VB.NET
Dim oOleDbConnection As OleDb.OleDbConnection
Dim sConnString As String = _
         "Provider=Microsoft.Jet.OLEDB.4.0;" & _
         "Data Source=C:\myPath\myJet.mdb;" & _
         "User ID=Admin;" & _
         "Password=;"
oOleDbConnection = New OleDb.OleDbConnection(sConnString)
oOleDbConnection.Open()
0
 
LVL 5

Expert Comment

by:thenrich
ID: 7160567
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.
0
 

Author Comment

by:npnp
ID: 7160614
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
0
 

Author Comment

by:npnp
ID: 7160831
And thank you to thenrich for that important item. -- Norm
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question