ADO Connect to SQL Server - Access Denied

Results 1 to 2 of 2

Thread: ADO Connect to SQL Server - Access Denied

  1. #1
    Join Date
    Dec 1969

    Default ADO Connect to SQL Server - Access Denied

    The name of our server is NMEMNRDWEB. The named instance in SQL 2000 is NMEMNRDWEBSQL2000. 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.<BR><BR>I have tried an ADO DSN connection, DSN-less ODBC Connection, OLEDB connection <BR><BR>&#060;%<BR>dim myconnection<BR>dim connectString<BR><BR>connectstring = "Driver={SQL Server};" & _ <BR> "Server=NMEMNRDWEBSQL2000;" & _<BR> "Database=MARP;" & _ <BR> "uid=MARPUser;" & _<BR> "pwd=marp;"<BR><BR>Set myConnection = Server.CreateObject("ADODB.Connection")<BR>Set rsCRPList = Server.CreateObject ("ADODB.Recordset")<BR><BR> = connectstring<BR>Set RSCRPList = myConnection.Execute( "Select * from VW_County")<BR>%&#062;<BR><BR>I have even tried to connect via an IP address using TCP/IP as opposed to <BR>named pipes:<BR><BR><BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .open "Provider=sqloledb;" & _<BR> "Data,1433;" & _<BR> "Network Library=DBMSSOCN;" & _<BR> "Initial Catalog=MARP;" & _<BR> "User ID=MARPUser;" & _<BR> "Password=marp;"<BR><BR><BR>strSQL = "Select * from tblMARPMines"<BR><BR>dim objRS<BR>Set objRS = Server.CreateObject ("ADODB.Recordset")<BR><BR>objRS.Open strSQL, objConn<BR>%&#062;<BR><BR>I always get the same error - <BR><BR>Error Type:<BR>Microsoft OLE DB Provider for SQL Server (0x80004005)<BR>[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.<BR>/Sequel/crpRAW2.asp, line 6<BR><BR>The error line always points to my line.<BR><BR><BR>Please advise.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ADO Connect to SQL Server - Access Denied

    try this connstring:<BR><BR>connstring = "Provider=sqloledb.1;Data Source=MARP;Initial Catalog=yourDB;User Id=MARPuser;Password=marp;"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts