Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > SQL connection issue

Reply
Thread Tools

SQL connection issue

 
 
Mike
Guest
Posts: n/a
 
      06-18-2004
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


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\) [MVP]
Guest
Posts: n/a
 
      06-18-2004
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      06-18-2004
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]" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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
> >
> >

>
>



 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\) [MVP]
Guest
Posts: n/a
 
      06-18-2004
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" <(E-Mail Removed)> wrote in message
news:ujN%(E-Mail Removed)...
> 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]" <(E-Mail Removed)>

wrote
> in message news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > 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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      06-18-2004
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]" <(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:ujN%(E-Mail Removed)...
> > 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]" <(E-Mail Removed)>

> wrote
> > in message news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> wrote in message
> > > news:%(E-Mail Removed)...
> > > > 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
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      06-18-2004
> 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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]" <(E-Mail Removed)>

wrote
> in message news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:ujN%(E-Mail Removed)...
> > > 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]" <(E-Mail Removed)>

> > wrote
> > > in message news:(E-Mail Removed)...
> > > > 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" <(E-Mail Removed)> wrote in message
> > > > news:%(E-Mail Removed)...
> > > > > 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
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      06-18-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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]" <(E-Mail Removed)>

> wrote
> > in message news:(E-Mail Removed)...
> > > 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" <(E-Mail Removed)> wrote in message
> > > news:ujN%(E-Mail Removed)...
> > > > 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]"

<(E-Mail Removed)>
> > > wrote
> > > > in message news:(E-Mail Removed)...
> > > > > 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" <(E-Mail Removed)> wrote in message
> > > > > news:%(E-Mail Removed)...
> > > > > > 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
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Trevor Benedict R
Guest
Posts: n/a
 
      06-19-2004
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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sql close connection issue.... lee atkinson ASP .Net 1 04-29-2009 10:19 AM
SQL Reference, SQL Queries, SQL help ecoolone ASP .Net 0 01-03-2008 10:58 AM
VPN connection issue; no data passing after connection brian.s Cisco 3 08-22-2007 05:37 PM
How to perform cleanup for javax.sql.DataSource, like we do for java.sql.Connection HalcyonWild Java 2 12-19-2005 08:54 AM
Issue with Identity Impersonation and user identity used passed for trusted SQL connection. Frederick D'hont ASP .Net Security 0 07-25-2005 02:41 PM



Advertisments