Solved

SQL Server does not exist

Posted on 2002-07-17
4
203 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
  • 2
4 Comments
 
LVL 69

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now