SQL Server does not exist error when no network connection

Discussion in 'ASP .Net' started by BobRoyAce, Mar 3, 2005.

  1. BobRoyAce

    BobRoyAce Guest

    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?
     
    BobRoyAce, Mar 3, 2005
    #1
    1. Advertising

  2. BobRoyAce

    Joey Lee Guest

    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" <> wrote in message
    news:...
    >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?
    >
    >
    >
     
    Joey Lee, Mar 3, 2005
    #2
    1. Advertising

  3. BobRoyAce

    BobRoyAce Guest

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

    "Joey Lee" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >>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?
    >>
    >>
    >>

    >
    >
     
    BobRoyAce, Mar 3, 2005
    #3
  4. 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?


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Patrick Olurotimi Ige, Mar 3, 2005
    #4
  5. BobRoyAce

    BobRoyAce Guest

    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.
     
    BobRoyAce, Mar 3, 2005
    #5
  6. BobRoyAce

    Newbie Guest

    try using 'localhost' as your datasource/server identifier.
    HTH,
    andy

    "BobRoyAce" <> wrote in message
    news:...
    > 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.
    >
    >
     
    Newbie, Mar 3, 2005
    #6
  7. BobRoyAce

    BobRoyAce Guest

    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.

    "Newbie" <> wrote in message
    news:...
    > try using 'localhost' as your datasource/server identifier.
    > HTH,
    > andy
    >
    > "BobRoyAce" <> wrote in message
    > news:...
    >> 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.
    >>
    >>

    >
    >
    >
     
    BobRoyAce, Mar 4, 2005
    #7
  8. 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



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Patrick Olurotimi Ige, Mar 4, 2005
    #8
  9. And it's even better connecting to the instance name.

    DataSource = SQLServerInstanceName
    or
    DataSource = SQLServerName\netsdk

    and not 127.0.0.1 *or* (local).



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en EspaƱol
    Ven, y hablemos de ASP.NET...
    ======================

    "Patrick Olurotimi Ige" <> wrote in message
    news:ee3%...
    > 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
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Juan T. Llibre, Mar 4, 2005
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Louden
    Replies:
    3
    Views:
    6,150
    Gaurav Vaish
    Oct 11, 2003
  2. Ben
    Replies:
    5
    Views:
    445
  3. Simone
    Replies:
    12
    Views:
    2,706
    Andy Fish
    Feb 7, 2005
  4. Roy
    Replies:
    10
    Views:
    591
  5. Geoff
    Replies:
    3
    Views:
    476
    Patrick.O.Ige
    Jan 16, 2006
Loading...

Share This Page