Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server does not exist

Posted on 2002-07-17
4
Medium Priority
?
215 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 70

Accepted Solution

by:
Éric Moreau earned 200 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

886 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