Database Connection Issues

Discussion in 'ASP .Net' started by bh, Jul 16, 2006.

  1. bh

    bh Guest

    I have an ASP.NET page, created in VS.NET 2003 which connects to a SQL
    Server 2000 Database on our network, using a connection string, as follows:

    Dim SQLConnString As String = "data source=SERVERNAME;initial
    catalog=DB;User ID=MyWebUser;Password=WebUserPassword"

    The server is on our network, but a different machine from both of the web
    servers I'm trying.

    Web Server 1: When I run this from Visual Studio (running on my laptop), it
    works fine every time.

    Web Server 2: When I run this from another web server within our network,
    SOMETIMES it works fine, and other times I get:

    SQL SERVER DOES NOT EXIST OR ACCESS DENIED

    If I go back & run it from Visual Studio on my laptop, again, it seems to
    SOMETIMES temporarily correct the issue from our other web server other
    times it has no effect.

    Does anyone have any idea as to what might be causing this? Thanks in
    advance.

    BH
     
    bh, Jul 16, 2006
    #1
    1. Advertising

  2. Try using the IP address of the server. It may be a name resolution issue.
    If so, the IP address will clear it up.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Professional Chicken Salad Alchemist

    What You Seek Is What You Get.


    "bh" <> wrote in message
    news:...
    >I have an ASP.NET page, created in VS.NET 2003 which connects to a SQL
    >Server 2000 Database on our network, using a connection string, as follows:
    >
    > Dim SQLConnString As String = "data source=SERVERNAME;initial
    > catalog=DB;User ID=MyWebUser;Password=WebUserPassword"
    >
    > The server is on our network, but a different machine from both of the web
    > servers I'm trying.
    >
    > Web Server 1: When I run this from Visual Studio (running on my laptop),
    > it works fine every time.
    >
    > Web Server 2: When I run this from another web server within our network,
    > SOMETIMES it works fine, and other times I get:
    >
    > SQL SERVER DOES NOT EXIST OR ACCESS DENIED
    >
    > If I go back & run it from Visual Studio on my laptop, again, it seems to
    > SOMETIMES temporarily correct the issue from our other web server other
    > times it has no effect.
    >
    > Does anyone have any idea as to what might be causing this? Thanks in
    > advance.
    >
    > BH
    >
     
    Kevin Spencer, Jul 16, 2006
    #2
    1. Advertising

  3. bh

    bh Guest

    Nope. That just caused the same error on the working copy, running straight
    out of Visual Studio, from the laptop. Any other ideas?

    Thanks for trying,
    BH

    "Kevin Spencer" <> wrote in message
    news:%...
    > Try using the IP address of the server. It may be a name resolution issue.
    > If so, the IP address will clear it up.
    >
    > --
    > HTH,
    >
    > Kevin Spencer
    > Microsoft MVP
    > Professional Chicken Salad Alchemist
    >
    > What You Seek Is What You Get.
    >
    >
    > "bh" <> wrote in message
    > news:...
    >>I have an ASP.NET page, created in VS.NET 2003 which connects to a SQL
    >>Server 2000 Database on our network, using a connection string, as
    >>follows:
    >>
    >> Dim SQLConnString As String = "data source=SERVERNAME;initial
    >> catalog=DB;User ID=MyWebUser;Password=WebUserPassword"
    >>
    >> The server is on our network, but a different machine from both of the
    >> web servers I'm trying.
    >>
    >> Web Server 1: When I run this from Visual Studio (running on my laptop),
    >> it works fine every time.
    >>
    >> Web Server 2: When I run this from another web server within our network,
    >> SOMETIMES it works fine, and other times I get:
    >>
    >> SQL SERVER DOES NOT EXIST OR ACCESS DENIED
    >>
    >> If I go back & run it from Visual Studio on my laptop, again, it seems to
    >> SOMETIMES temporarily correct the issue from our other web server other
    >> times it has no effect.
    >>
    >> Does anyone have any idea as to what might be causing this? Thanks in
    >> advance.
    >>
    >> BH
    >>

    >
    >
     
    bh, Jul 16, 2006
    #3
  4. bh

    Guest

    1. Try using IP Address
    2. Try changing the Network connectivity (TCP/IP, Named Pipes...)


    bh wrote:
    > I have an ASP.NET page, created in VS.NET 2003 which connects to a SQL
    > Server 2000 Database on our network, using a connection string, as follows:
    >
    > Dim SQLConnString As String = "data source=SERVERNAME;initial
    > catalog=DB;User ID=MyWebUser;Password=WebUserPassword"
    >
    > The server is on our network, but a different machine from both of the web
    > servers I'm trying.
    >
    > Web Server 1: When I run this from Visual Studio (running on my laptop), it
    > works fine every time.
    >
    > Web Server 2: When I run this from another web server within our network,
    > SOMETIMES it works fine, and other times I get:
    >
    > SQL SERVER DOES NOT EXIST OR ACCESS DENIED
    >
    > If I go back & run it from Visual Studio on my laptop, again, it seems to
    > SOMETIMES temporarily correct the issue from our other web server other
    > times it has no effect.
    >
    > Does anyone have any idea as to what might be causing this? Thanks in
    > advance.
    >
    > BH
     
    , Jul 16, 2006
    #4
  5. bh

    Guest

    don't forget the instance name if you have one:

    ServerName\InstanceName

    for sql express, it's:

    ServerName\SqlExpress (um, i think :) )

    wrote:
    > 1. Try using IP Address
    > 2. Try changing the Network connectivity (TCP/IP, Named Pipes...)
    >
    >
    > bh wrote:
    > > I have an ASP.NET page, created in VS.NET 2003 which connects to a SQL
    > > Server 2000 Database on our network, using a connection string, as follows:
    > >
    > > Dim SQLConnString As String = "data source=SERVERNAME;initial
    > > catalog=DB;User ID=MyWebUser;Password=WebUserPassword"
    > >
    > > The server is on our network, but a different machine from both of the web
    > > servers I'm trying.
    > >
    > > Web Server 1: When I run this from Visual Studio (running on my laptop), it
    > > works fine every time.
    > >
    > > Web Server 2: When I run this from another web server within our network,
    > > SOMETIMES it works fine, and other times I get:
    > >
    > > SQL SERVER DOES NOT EXIST OR ACCESS DENIED
    > >
    > > If I go back & run it from Visual Studio on my laptop, again, it seems to
    > > SOMETIMES temporarily correct the issue from our other web server other
    > > times it has no effect.
    > >
    > > Does anyone have any idea as to what might be causing this? Thanks in
    > > advance.
    > >
    > > BH
     
    , Jul 16, 2006
    #5
    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. Mythran
    Replies:
    5
    Views:
    5,006
    Mythran
    Oct 5, 2005
  2. Andy G

    ADODB.Connection closing issues

    Andy G, Nov 14, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    4,146
    Andy G
    Nov 14, 2005
  3. Joshua Andrews

    Issues with Webserver connection

    Joshua Andrews, Sep 26, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    Joshua Andrews
    Sep 26, 2006
  4. Mike
    Replies:
    3
    Views:
    331
    Roedy Green
    Nov 6, 2007
  5. RGF
    Replies:
    13
    Views:
    2,842
Loading...

Share This Page