Results 1 to 2 of 2

Thread: ConnectionStrings

  1. #1
    Join Date
    Dec 1969

    Default ConnectionStrings

    New at this, so your patience is appreciated. Looked on the FAQ and in my "SAMS Teach Yourself Active Server Pages 3.0" and I still can&#039t connect to the database.<BR><BR>Here’s the code:<BR><BR>Dim objConn<BR>Dim objRS<BR><BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR>objConn. ConnectionString = "DSN=NFLpix.dsn"<BR>objConn.Open<BR>objRS.Open "SELECT * FROM schedule", objConn<BR><BR><BR>Here’s the error message:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’<BR>[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified.<BR><BR>The error arises when it hits the code "objConn.Open".<BR><BR>I don’t seem to be able to identify my data source properly. The access database NFLpix.mdb resides in a directory on the web server.<BR><BR>Thanks for your response.<BR><BR>Ray

  2. #2
    Join Date
    Dec 1969

    Default RE: ConnectionStrings

    This is often the result of the dsn not being available on the web server. This frequently happens if you generate the dsn on one machine and then forget to copy it to the web server.

Posting Permissions

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