SQL Server does not exist error when no network connection

B

BobRoyAce

I have an ASP.NET application set up on my local hard drive with all pages,
dlls, and SQL server on local machine. However, I have discovered that if I
reboot my machine without a network cable plugged in, and then try to run
the application, I get the following:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.

If I then plug in the network cable, and wait a minute or so, the
application will then work. If I unplug it again, it stops working again.
What gives here? Is there some kind of driver that gets loaded when the PC
is connected to the network that is important somehow for how the
application connects to SQL Server?
 
J

Joey Lee

Just a wild guess...

Is your connection string is based on IP or computer name?
Maybe because u are not on a network, your DCHP is not configured to the
"correct ip".
 
B

BobRoyAce

The connection string contains an IP...not a computer name.

Joey Lee said:
Just a wild guess...

Is your connection string is based on IP or computer name?
Maybe because u are not on a network, your DCHP is not configured to the
"correct ip".

BobRoyAce said:
I have an ASP.NET application set up on my local hard drive with all
pages, dlls, and SQL server on local machine. However, I have discovered
that if I reboot my machine without a network cable plugged in, and then
try to run the application, I get the following:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.

If I then plug in the network cable, and wait a minute or so, the
application will then work. If I unplug it again, it stops working again.
What gives here? Is there some kind of driver that gets loaded when the
PC is connected to the network that is important somehow for how the
application connects to SQL Server?
 
P

Patrick Olurotimi Ige

BobRoyAce,
Can you give an idea how your connectionstring looks like..
Post it if u can
** But u stated ur SQLServer is installed on ur local PC?
And u didn't give it another IP adrees when u installed it?
 
B

BobRoyAce

ConnectionString = "Persist Security Info=False;Initial Catalog=THEDB;Data
Source=127.0.0.1;user=appuser;password=thepassword;Connect Timeout=120"

NOTE: All works well as long as network cable is plugged in...just doesnt
work if it's not plugged in...so not a connection string problem. I am
wondering if TCP/IP is required to make the connection and if it isn't in
memory if boot up without cable since it detects that there is no network
connection.
 
B

BobRoyAce

That didn't help. Ultimately, solution was to install a Microsoft Loopback
network adapter (not an actual physical device, but can select from list).
Once did this, problem went away.
 
P

Patrick Olurotimi Ige

BobRoyAce,
that was why i was asking how u were connecting!!
Cos Microsoft Loopback network adapter is default.
So its better connecting to DataSource = (local) and not 127.0.0.1.
Well good u got it working!
Patrick
 
J

Juan T. Llibre

And it's even better connecting to the instance name.

DataSource = SQLServerInstanceName
or
DataSource = SQLServerName\netsdk

and not 127.0.0.1 *or* (local).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top