Groups | Blog | Home
all groups > sql server connect > december 2003 >

sql server connect : Setting up SQL connection fails


Frank
12/28/2003 8:16:59 AM
When attempting to configure an OleDbDataAdapter I get the
following error message:

[DBNETLIB][ConnectionOpen(Connect()).] SQL Server does not
exist or access denied.

Here is the detail

I am evaluating Visual Studio.Net and I am new to the
environment. In the process of evaluating VS.Net, I am
working through several of the "walk through" sample
programs. The sample that I am currently working on
is "Walkthrough: Simple Data Access in a Windows Form"

The sample states:

In order to complete this walkthrough, you will need
Access to a server with the Pubs SQL Server sample
database.

When I search the directory of my hard drive, I can find
the "Pubs" data base in the followng location
c:
Program Files
Microsoft SQL Server
MSSQL$NETSDK
DATA
Pubs.mdf

Additionally, when querry with "net start" at the command
prompt, I find that MSSQL$NETSDK is running.

So, as far as I can tell, I do have access to a server
(local) and the "Pubs" data base.

After I drop the OleDbDataAdapter onto the windows form,
the "Data Adapeter Configuration Wizard" starts.

On page 2 of this wizard, the "Which Data Connection
Should the Adapter Use" combo box is blank. I am unable
to type anything into the combo box, nor does the drop
down arrow drop anyitem down. Next to the combo box is
a "new connection" button, which when clicked brings up
a "Data Link Properties Dialog."

This dialog box has 3 steps. In the first step I
type "local" or "localhost" (I've tried both) into
the "Server Name." In the second step, I've selected
the "Use Windows NT integrated security" radio button. In
the third step which is the "Select the Database on the
server" radio button and combo box, I click on the drop
down arrow and I get the error message:

[DBNETLIB][ConnectionOpen(Connect()).] SQL Server does not
exist or access denied.
anonymous NO[at]SPAM discussions.microsoft.com
12/28/2003 9:39:37 AM
Thanks.

When setting access, a batch file
called "ConfigureAspUser" is run. Upon examining the
contents of the SQL server log, I observed that the name
of the server is "TOSHIBALAPTOP\NETSDK". When I
entered "TOSHIBALAPTOP\NETSDK" as the name of the server,
I connected to the local host just fine.

[quoted text, click to view]
Foo Man Chew
12/28/2003 11:44:23 AM
[quoted text, click to view]

You shouldn't care where the MDF file lives. Unlike Access, SQL Server is
not a database system that relies on the user knowing where the file(s) are,
or even that file(s) exist.

It looks like you are using a named instance of SQL Server, so you might try
using LOCALHOST\NETSDK in your connection string, rather than just
LOCALHOST.

[quoted text, click to view]

This might also be a problem, depending on how SQL Server was set up. Are
you a user with sufficient permissions (e.g. a local or domain
Administrator)? If not, has your user been set up in the database?

Linchi Shea
12/29/2003 11:52:43 AM
Check out the article:

http://support.microsoft.com/?id=328306 (INF: Potential
Causes of the "SQL Server Does Not Exist or Access Denied"
Error Message)

Linchi

[quoted text, click to view]
AddThis Social Bookmark Button