|
 |
asp_database_setup thread: ADO Connection to SQL Server
Message #1 by rberkhoudt@s... on Wed, 5 Dec 2001 23:01:17
|
|
I have alot of web data in Access that I want to migrate to Sequel. I am
having a problem setting up my ADO Connection.
I have tried to connect using a DSN connection with SQL Server
Authentication, connect using DSN-less ODBC, connect using OLE DB and
connect using a TCP/IP address.
I always get the same error: SQL Server does not exist or access denied.
I have checked in Enterprise manager that the UserID and password are
active in the database.
I have checked each line and character of code. Could the problem be on
the SQL Server side?
Here is an extract of my OLEDB code:
<HTML>
<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=sqloledb;" & _
"Data Source=NMEMNRDWEB\SQL2000;" & _
"Initial Catalog=CoalWeb;" & _
"User Id=MARPUser;" & _
"Password=marp;"
%>
Here is my error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access
denied.
/Sequel/crpRAW2.asp, line 6
Please advise. Thanks
Rene
Message #2 by "Stephen Woods" <stephen@v...> on Thu, 6 Dec 2001 10:01:45 +1100
|
|
Usually I would put the server name in the Data Source spot,
What is the server name? the name of the server that the SQL resides on?
Possibly use that.
-----Original Message-----
From: rberkhoudt@s... [mailto:rberkhoudt@s...]
Sent: Wednesday, 5 December 2001 11:01 PM
To: ASP Database Setup
Subject: [asp_database_setup] ADO Connection to SQL Server
I have alot of web data in Access that I want to migrate to Sequel. I
am
having a problem setting up my ADO Connection.
I have tried to connect using a DSN connection with SQL Server
Authentication, connect using DSN-less ODBC, connect using OLE DB and
connect using a TCP/IP address.
I always get the same error: SQL Server does not exist or access
denied.
I have checked in Enterprise manager that the UserID and password are
active in the database.
I have checked each line and character of code. Could the problem be on
the SQL Server side?
Here is an extract of my OLEDB code:
<HTML>
<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=sqloledb;" & _
"Data Source=NMEMNRDWEB\SQL2000;" & _
"Initial Catalog=CoalWeb;" & _
"User Id=MARPUser;" & _
"Password=marp;"
%>
Here is my error:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or
access
denied.
/Sequel/crpRAW2.asp, line 6
Please advise. Thanks
Rene
stephen@v...
$subst('Email.Unsub')
$subst('Email.Unsub').
Message #3 by rberkhoudt@s... on Thu, 6 Dec 2001 14:36:34
|
|
Stephen; The name of our server is NMEMNRDWEB. The named instance in SQL
2000 is NMEMNRDWEB\SQL2000. The name of the database is MARP, and I have
a user named MARPUser with a password of marp. I can connect to the
Sequel Server using Enterprise Manager and am also able to create a system
DSN using these parameters.
I also tried to use a connect via an IP address using TCP/IP as opposed to
named pipes:
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.open "Provider=sqloledb;" & _
"Data Source=xxx.xx.xxx.xx,1433;" & _
"Network Library=DBMSSOCN;" & _
"Initial Catalog=MARP;" & _
"User ID=MARPUser;" & _
"Password=marp;"
strSQL = "Select * from tblMARPMines"
dim objRS
Set objRS = Server.CreateObject ("ADODB.Recordset")
objRS.Open strSQL, objConn
%>
I get the same error.
Please advise.
Message #4 by "Ken Schaefer" <ken@a...> on Fri, 7 Dec 2001 14:19:42 +1100
|
|
You did actually put a valid IP address in for xxx.xxx.xxx.xxx didn't you?
(just have to check)
What if you try to add a new SQL Server Registration using EM, but use the
IP address instead of the NetBIOS name?
Lastly, are there any devices (firewalls, routers etc) between your machine
and the SQL Server that would prevent a connection being made using TCP/IP
to port 1433?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: <rberkhoudt@s...>
Subject: [asp_database_setup] RE: ADO Connection to SQL Server
: Stephen; The name of our server is NMEMNRDWEB. The named instance in SQL
: 2000 is NMEMNRDWEB\SQL2000. The name of the database is MARP, and I have
: a user named MARPUser with a password of marp. I can connect to the
: Sequel Server using Enterprise Manager and am also able to create a system
: DSN using these parameters.
:
: I also tried to use a connect via an IP address using TCP/IP as opposed to
: named pipes:
:
:
: Set objConn = Server.CreateObject("ADODB.Connection")
: objConn.open "Provider=sqloledb;" & _
: "Data Source=xxx.xx.xxx.xx,1433;" & _
: "Network Library=DBMSSOCN;" & _
: "Initial Catalog=MARP;" & _
: "User ID=MARPUser;" & _
: "Password=marp;"
:
:
: strSQL = "Select * from tblMARPMines"
:
: dim objRS
: Set objRS = Server.CreateObject ("ADODB.Recordset")
:
: objRS.Open strSQL, objConn
: %>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.
|
|
 |