Solved

SQL Server does not exist

Posted on 2002-07-17
4
211 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

735 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