By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,773 Members | 1,779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,773 IT Pros & Developers. It's quick & easy.

SQL connection issue

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #2

P: n/a
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;U ID=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]" <No************@comcast.netNoSpamM> wrote
in message news:es*************@TK2MSFTNGP10.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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


Nov 18 '05 #3

P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:uj****************@TK2MSFTNGP11.phx.gbl...
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;U ID=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]" <No************@comcast.netNoSpamM> wrote in message news:es*************@TK2MSFTNGP10.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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



Nov 18 '05 #4

P: n/a
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]" <No************@comcast.netNoSpamM> wrote
in message news:uA**************@tk2msftngp13.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:uj****************@TK2MSFTNGP11.phx.gbl...
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;U ID=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]" <No************@comcast.netNoSpamM>

wrote
in message news:es*************@TK2MSFTNGP10.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
> 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
>
>



Nov 18 '05 #5

P: n/a
> 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" <an*******@discussions.microsoft.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl... 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]" <No************@comcast.netNoSpamM> wrote in message news:uA**************@tk2msftngp13.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:uj****************@TK2MSFTNGP11.phx.gbl...
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;U ID=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]" <No************@comcast.netNoSpamM>

wrote
in message news:es*************@TK2MSFTNGP10.phx.gbl...
> 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" <an*******@discussions.microsoft.com> wrote in message
> news:%2****************@TK2MSFTNGP12.phx.gbl...
> > 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
> >
> >
>
>



Nov 18 '05 #6

P: n/a
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" <ks******@takempis.com> wrote in message
news:uE**************@TK2MSFTNGP12.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:On**************@TK2MSFTNGP11.phx.gbl...
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]" <No************@comcast.netNoSpamM>

wrote
in message news:uA**************@tk2msftngp13.phx.gbl...
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" <an*******@discussions.microsoft.com> wrote in message
news:uj****************@TK2MSFTNGP11.phx.gbl...
> 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;U ID=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]" <No************@comcast.netNoSpamM> wrote
> in message news:es*************@TK2MSFTNGP10.phx.gbl...
> > 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" <an*******@discussions.microsoft.com> wrote in message
> > news:%2****************@TK2MSFTNGP12.phx.gbl...
> > > 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
> > >
> > >
> >
> >
>
>



Nov 18 '05 #7

P: n/a
Checkout this thread also
http://www.devdex.com/asp/message.as...NdVYVEHA%2E409
2%40TK2MSFTNGP11%2Ephx%2Egbl%3E

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.