SQL connection issue

M

Mike

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
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

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!
************************************************
 
M

Mike

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()
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

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!
************************************************
 
M

Mike

ok I'll give that a shot.

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

Kevin Spencer

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

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.
 
M

Mike

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top