SQL connection issue

Discussion in 'ASP .Net' started by Mike, Jun 18, 2004.

  1. Mike

    Mike Guest

    I'm trying to connect to a SQL 2000 db that is on another server then the
    web server.
    I setup and ID and PWD to access the SQL db via the code and it works
    locally and when I put the
    everything on the web server I get an Access denied to SQL Database.

    what is causing this, what do i need to change
    Mike, Jun 18, 2004
    #1
    1. Advertising

  2. 1. Make sure you have mixed mode security (rerun install if not) - sounds
    like you have this
    2. Check what libraries you have available. In most instances, you want
    TCP/IP to avoid having to contact SQL via named pipes (and its install on
    the web server). You can install this library on the server through the
    install routine. By default, I believe it is not installed.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ************************************************
    Think Outside the Box!
    ************************************************
    "Mike" <> wrote in message
    news:%...
    > I'm trying to connect to a SQL 2000 db that is on another server then the
    > web server.
    > I setup and ID and PWD to access the SQL db via the code and it works
    > locally and when I put the
    > everything on the web server I get an Access denied to SQL Database.
    >
    > what is causing this, what do i need to change
    >
    >
    Cowboy \(Gregory A. Beamer\) [MVP], Jun 18, 2004
    #2
    1. Advertising

  3. Mike

    Mike Guest

    we did what you recommend below and still getting the login failed error
    message.
    here is my connection string, how can i make this point to a DSN instead of
    the actual server name right now.
    I need to get this app up and running quickly and been going through this
    permission issue for 2 days

    dim ds as DataSet
    Dim MyConnection As SqlConnection
    Dim MyCommand As SqlDataAdapter


    MyConnection = New
    SqlConnection("server=SQLServer;database=MRL_SSC;UID=ID;PWD=password")


    MyCommand = New SqlDataAdapter("select * from Form", MyConnection)

    DS = New DataSet()
    MyCommand.Fill(DS, "Form")

    MyDataGrid.DataSource = DS.Tables("Form").DefaultView
    MyDataGrid.DataBind()







    "Cowboy (Gregory A. Beamer) [MVP]" <> wrote
    in message news:...
    > 1. Make sure you have mixed mode security (rerun install if not) - sounds
    > like you have this
    > 2. Check what libraries you have available. In most instances, you want
    > TCP/IP to avoid having to contact SQL via named pipes (and its install on
    > the web server). You can install this library on the server through the
    > install routine. By default, I believe it is not installed.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ************************************************
    > Think Outside the Box!
    > ************************************************
    > "Mike" <> wrote in message
    > news:%...
    > > I'm trying to connect to a SQL 2000 db that is on another server then

    the
    > > web server.
    > > I setup and ID and PWD to access the SQL db via the code and it works
    > > locally and when I put the
    > > everything on the web server I get an Access denied to SQL Database.
    > >
    > > what is causing this, what do i need to change
    > >
    > >

    >
    >
    Mike, Jun 18, 2004
    #3
  4. Try this, just to be safe:

    Change from server=SQLServer
    to server={IP Address of Server}

    Since you are using SqlConnection, the rest of the string looks fine. If
    that does not work, post the actual wording of the error message, as it may
    give some additional clues.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ************************************************
    Think Outside the Box!
    ************************************************
    "Mike" <> wrote in message
    news:ujN%...
    > we did what you recommend below and still getting the login failed error
    > message.
    > here is my connection string, how can i make this point to a DSN instead

    of
    > the actual server name right now.
    > I need to get this app up and running quickly and been going through this
    > permission issue for 2 days
    >
    > dim ds as DataSet
    > Dim MyConnection As SqlConnection
    > Dim MyCommand As SqlDataAdapter
    >
    >
    > MyConnection = New
    > SqlConnection("server=SQLServer;database=MRL_SSC;UID=ID;PWD=password")
    >
    >
    > MyCommand = New SqlDataAdapter("select * from Form", MyConnection)
    >
    > DS = New DataSet()
    > MyCommand.Fill(DS, "Form")
    >
    > MyDataGrid.DataSource = DS.Tables("Form").DefaultView
    > MyDataGrid.DataBind()
    >
    >
    >
    >
    >
    >
    >
    > "Cowboy (Gregory A. Beamer) [MVP]" <>

    wrote
    > in message news:...
    > > 1. Make sure you have mixed mode security (rerun install if not) -

    sounds
    > > like you have this
    > > 2. Check what libraries you have available. In most instances, you want
    > > TCP/IP to avoid having to contact SQL via named pipes (and its install

    on
    > > the web server). You can install this library on the server through the
    > > install routine. By default, I believe it is not installed.
    > >
    > > --
    > > Gregory A. Beamer
    > > MVP; MCP: +I, SE, SD, DBA
    > >
    > > ************************************************
    > > Think Outside the Box!
    > > ************************************************
    > > "Mike" <> wrote in message
    > > news:%...
    > > > I'm trying to connect to a SQL 2000 db that is on another server then

    > the
    > > > web server.
    > > > I setup and ID and PWD to access the SQL db via the code and it works
    > > > locally and when I put the
    > > > everything on the web server I get an Access denied to SQL Database.
    > > >
    > > > what is causing this, what do i need to change
    > > >
    > > >

    > >
    > >

    >
    >
    Cowboy \(Gregory A. Beamer\) [MVP], Jun 18, 2004
    #4
  5. Mike

    Mike Guest

    ok I'll give that a shot.

    does having the IP make of difference then the actual name of the server? If
    so why?


    "Cowboy (Gregory A. Beamer) [MVP]" <> wrote
    in message news:...
    > Try this, just to be safe:
    >
    > Change from server=SQLServer
    > to server={IP Address of Server}
    >
    > Since you are using SqlConnection, the rest of the string looks fine. If
    > that does not work, post the actual wording of the error message, as it

    may
    > give some additional clues.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > ************************************************
    > Think Outside the Box!
    > ************************************************
    > "Mike" <> wrote in message
    > news:ujN%...
    > > we did what you recommend below and still getting the login failed error
    > > message.
    > > here is my connection string, how can i make this point to a DSN instead

    > of
    > > the actual server name right now.
    > > I need to get this app up and running quickly and been going through

    this
    > > permission issue for 2 days
    > >
    > > dim ds as DataSet
    > > Dim MyConnection As SqlConnection
    > > Dim MyCommand As SqlDataAdapter
    > >
    > >
    > > MyConnection = New
    > > SqlConnection("server=SQLServer;database=MRL_SSC;UID=ID;PWD=password")
    > >
    > >
    > > MyCommand = New SqlDataAdapter("select * from Form",

    MyConnection)
    > >
    > > DS = New DataSet()
    > > MyCommand.Fill(DS, "Form")
    > >
    > > MyDataGrid.DataSource = DS.Tables("Form").DefaultView
    > > MyDataGrid.DataBind()
    > >
    > >
    > >
    > >
    > >
    > >
    > >
    > > "Cowboy (Gregory A. Beamer) [MVP]" <>

    > wrote
    > > in message news:...
    > > > 1. Make sure you have mixed mode security (rerun install if not) -

    > sounds
    > > > like you have this
    > > > 2. Check what libraries you have available. In most instances, you

    want
    > > > TCP/IP to avoid having to contact SQL via named pipes (and its install

    > on
    > > > the web server). You can install this library on the server through

    the
    > > > install routine. By default, I believe it is not installed.
    > > >
    > > > --
    > > > Gregory A. Beamer
    > > > MVP; MCP: +I, SE, SD, DBA
    > > >
    > > > ************************************************
    > > > Think Outside the Box!
    > > > ************************************************
    > > > "Mike" <> wrote in message
    > > > news:%...
    > > > > I'm trying to connect to a SQL 2000 db that is on another server

    then
    > > the
    > > > > web server.
    > > > > I setup and ID and PWD to access the SQL db via the code and it

    works
    > > > > locally and when I put the
    > > > > everything on the web server I get an Access denied to SQL Database.
    > > > >
    > > > > what is causing this, what do i need to change
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Mike, Jun 18, 2004
    #5
  6. > does having the IP make of difference then the actual name of the server?
    If
    > so why?


    Depends on the network relationship of the 2 machines. IP address always
    works.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Mike" <> wrote in message
    news:...
    > ok I'll give that a shot.
    >
    > does having the IP make of difference then the actual name of the server?

    If
    > so why?
    >
    >
    > "Cowboy (Gregory A. Beamer) [MVP]" <>

    wrote
    > in message news:...
    > > Try this, just to be safe:
    > >
    > > Change from server=SQLServer
    > > to server={IP Address of Server}
    > >
    > > Since you are using SqlConnection, the rest of the string looks fine. If
    > > that does not work, post the actual wording of the error message, as it

    > may
    > > give some additional clues.
    > >
    > > --
    > > Gregory A. Beamer
    > > MVP; MCP: +I, SE, SD, DBA
    > >
    > > ************************************************
    > > Think Outside the Box!
    > > ************************************************
    > > "Mike" <> wrote in message
    > > news:ujN%...
    > > > we did what you recommend below and still getting the login failed

    error
    > > > message.
    > > > here is my connection string, how can i make this point to a DSN

    instead
    > > of
    > > > the actual server name right now.
    > > > I need to get this app up and running quickly and been going through

    > this
    > > > permission issue for 2 days
    > > >
    > > > dim ds as DataSet
    > > > Dim MyConnection As SqlConnection
    > > > Dim MyCommand As SqlDataAdapter
    > > >
    > > >
    > > > MyConnection = New
    > > > SqlConnection("server=SQLServer;database=MRL_SSC;UID=ID;PWD=password")
    > > >
    > > >
    > > > MyCommand = New SqlDataAdapter("select * from Form",

    > MyConnection)
    > > >
    > > > DS = New DataSet()
    > > > MyCommand.Fill(DS, "Form")
    > > >
    > > > MyDataGrid.DataSource = DS.Tables("Form").DefaultView
    > > > MyDataGrid.DataBind()
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > >
    > > > "Cowboy (Gregory A. Beamer) [MVP]" <>

    > > wrote
    > > > in message news:...
    > > > > 1. Make sure you have mixed mode security (rerun install if not) -

    > > sounds
    > > > > like you have this
    > > > > 2. Check what libraries you have available. In most instances, you

    > want
    > > > > TCP/IP to avoid having to contact SQL via named pipes (and its

    install
    > > on
    > > > > the web server). You can install this library on the server through

    > the
    > > > > install routine. By default, I believe it is not installed.
    > > > >
    > > > > --
    > > > > Gregory A. Beamer
    > > > > MVP; MCP: +I, SE, SD, DBA
    > > > >
    > > > > ************************************************
    > > > > Think Outside the Box!
    > > > > ************************************************
    > > > > "Mike" <> wrote in message
    > > > > news:%...
    > > > > > I'm trying to connect to a SQL 2000 db that is on another server

    > then
    > > > the
    > > > > > web server.
    > > > > > I setup and ID and PWD to access the SQL db via the code and it

    > works
    > > > > > locally and when I put the
    > > > > > everything on the web server I get an Access denied to SQL

    Database.
    > > > > >
    > > > > > what is causing this, what do i need to change
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Kevin Spencer, Jun 18, 2004
    #6
  7. Mike

    Mike Guest

    OK i have the IP address in the connection string, the ID and PWD setup on
    the db server, and i'm still getting access denied.

    Any suggestions, I'm totally stumped now


    "Kevin Spencer" <> wrote in message
    news:...
    > > does having the IP make of difference then the actual name of the

    server?
    > If
    > > so why?

    >
    > Depends on the network relationship of the 2 machines. IP address always
    > works.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Mike" <> wrote in message
    > news:...
    > > ok I'll give that a shot.
    > >
    > > does having the IP make of difference then the actual name of the

    server?
    > If
    > > so why?
    > >
    > >
    > > "Cowboy (Gregory A. Beamer) [MVP]" <>

    > wrote
    > > in message news:...
    > > > Try this, just to be safe:
    > > >
    > > > Change from server=SQLServer
    > > > to server={IP Address of Server}
    > > >
    > > > Since you are using SqlConnection, the rest of the string looks fine.

    If
    > > > that does not work, post the actual wording of the error message, as

    it
    > > may
    > > > give some additional clues.
    > > >
    > > > --
    > > > Gregory A. Beamer
    > > > MVP; MCP: +I, SE, SD, DBA
    > > >
    > > > ************************************************
    > > > Think Outside the Box!
    > > > ************************************************
    > > > "Mike" <> wrote in message
    > > > news:ujN%...
    > > > > we did what you recommend below and still getting the login failed

    > error
    > > > > message.
    > > > > here is my connection string, how can i make this point to a DSN

    > instead
    > > > of
    > > > > the actual server name right now.
    > > > > I need to get this app up and running quickly and been going through

    > > this
    > > > > permission issue for 2 days
    > > > >
    > > > > dim ds as DataSet
    > > > > Dim MyConnection As SqlConnection
    > > > > Dim MyCommand As SqlDataAdapter
    > > > >
    > > > >
    > > > > MyConnection = New
    > > > >

    SqlConnection("server=SQLServer;database=MRL_SSC;UID=ID;PWD=password")
    > > > >
    > > > >
    > > > > MyCommand = New SqlDataAdapter("select * from Form",

    > > MyConnection)
    > > > >
    > > > > DS = New DataSet()
    > > > > MyCommand.Fill(DS, "Form")
    > > > >
    > > > > MyDataGrid.DataSource = DS.Tables("Form").DefaultView
    > > > > MyDataGrid.DataBind()
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > >
    > > > > "Cowboy (Gregory A. Beamer) [MVP]"

    <>
    > > > wrote
    > > > > in message news:...
    > > > > > 1. Make sure you have mixed mode security (rerun install if not) -
    > > > sounds
    > > > > > like you have this
    > > > > > 2. Check what libraries you have available. In most instances, you

    > > want
    > > > > > TCP/IP to avoid having to contact SQL via named pipes (and its

    > install
    > > > on
    > > > > > the web server). You can install this library on the server

    through
    > > the
    > > > > > install routine. By default, I believe it is not installed.
    > > > > >
    > > > > > --
    > > > > > Gregory A. Beamer
    > > > > > MVP; MCP: +I, SE, SD, DBA
    > > > > >
    > > > > > ************************************************
    > > > > > Think Outside the Box!
    > > > > > ************************************************
    > > > > > "Mike" <> wrote in message
    > > > > > news:%...
    > > > > > > I'm trying to connect to a SQL 2000 db that is on another server

    > > then
    > > > > the
    > > > > > > web server.
    > > > > > > I setup and ID and PWD to access the SQL db via the code and it

    > > works
    > > > > > > locally and when I put the
    > > > > > > everything on the web server I get an Access denied to SQL

    > Database.
    > > > > > >
    > > > > > > what is causing this, what do i need to change
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Mike, Jun 18, 2004
    #7
  8. Trevor Benedict R, Jun 19, 2004
    #8
    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:
    4,922
    Mythran
    Oct 5, 2005
  2. HalcyonWild
    Replies:
    2
    Views:
    900
    HalcyonWild
    Dec 19, 2005
  3. ecoolone
    Replies:
    0
    Views:
    732
    ecoolone
    Jan 3, 2008
  4. lee atkinson

    Sql close connection issue....

    lee atkinson, Apr 29, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    445
    lee atkinson
    Apr 29, 2009
  5. Frederick D'hont
    Replies:
    0
    Views:
    293
    Frederick D'hont
    Jul 25, 2005
Loading...

Share This Page