connection to database can't be found

Results 1 to 2 of 2

Thread: connection to database can't be found

  1. #1
    Join Date
    Dec 1969
    Posts
    294

    Default connection to database can't be found

    I have just moved my test site to a new local server, when I tried to reset the ODBC connection I keep getting an error message.<BR>ADODB.Command error &#039 800a0e7a&#039 <BR><BR>ADO could not find the specified provider<BR><BR>I have pointed the ODBC connection to the moved database, but it doesn&#039t seem to be able to find the database.<BR><BR>This is how I am calling the database in the code:<BR><BR>Set Cm = Server.CreateObject("ADODB.Command")<BR><BR><BR> Cm. ActiveConnection = "Extranet"<BR><BR>Is this right or is there another way of making the connection, and why does it not see that I have moved the database?<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    553

    Default RE: connection to database can't be found

    You need to create a connection object before creating your command object. Try this...<BR><BR>set conn=server.createobject("adodb.connection")<BR>co nn.Open "DSN=Extranet"<BR><BR>This syntax is for an Access database, but will get you started.<BR><BR>joe<BR>

Posting Permissions

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