Closed or invalid connection

Results 1 to 2 of 2

Thread: Closed or invalid connection

  1. #1
    Join Date
    Dec 1969

    Default Closed or invalid connection

    Hi all,<BR><BR>I&#039;m have trouble connecting my database to my ASP page. I have PWS installed at home and have been trying to use a DSN connection. <BR><BR>But everytime I try to open up the ASP page that is linked to my database, I get the same error.<BR>"ADODB.Recordset error &#039;800a0e79&#039;. Operation is not allowed on an object referencing a closed or invalid connection"<BR><BR>I don&#039;t understand how this could be happening. I made sure my Access database was up in the System DSN and the the physical path was the same as where the database was, with the proper driver, and I made sure that the ConnectionString method has the right name for the database (ie the name I entered into the DSN, not the actual database name, which I made sure were the same anyway). I made sure that the &#039;; was copied into my root directory too and I&#039;ve triple checked all the coding. I&#039;m stumped.<BR><BR>I tried using a DSN-less connection but the same error came up.<BR><BR>Here is my code.<BR><BR>&#060;% Language=VBScript %&#062;<BR>&#060;% Option Explicit %&#062;<BR>&#060;!--#include virtual="/"--&#062;<BR>&#060;%<BR>Dim objConn<BR>Set objConn = Server.CreateObject("ADODB.Connection")<BR>objConn .ConnectionString = "DSN=promotemps.dbs"<BR>objConn.Open<BR><BR>Di m objRS<BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR><BR>I have a lot of extra code after this, mainly my Request objects and my SQL statement.<BR><BR>Any help or suggestions would be greatly appricated.<BR><BR> Mike

  2. #2
    Join Date
    Dec 1969

    Default Which line gives that error?

    I don&#039;t see any possible way you are getting that error from the code you showed so far.<BR><BR>Show the *ACTUAL LINE* that gives the error *AND* copy/paste the entire error message to here.<BR><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