close recordset problem

Results 1 to 2 of 2

Thread: close recordset problem

  1. #1
    Join Date
    Dec 1969

    Default close recordset problem

    Hi ya<BR><BR>Any idea why I get an error: ADODB.Recordset error &#039;800a0e78&#039; <BR>Operation is not allowed when the object is closed. <BR><BR>after my performing the SQL I want to close the recordset and the connection to the database. I get the error on the rs.close line.<BR><BR>Here is my code:<BR><BR>set dbcon=Server.CreateObject("adodb.connection")<BR>d osneydsn<BR>set rs=Server.CreateObject("adodb.Recordset")<BR>sqlst mt = "INSERT INTO tblevents (edatestart) VALUES (&#039;" & datestring & "&#039;)"<BR> sqlstmt, osneydsn<BR>rs.close<BR>dbcon.close<BR><BR>thanks< BR>Redeem.

  2. #2
    Join Date
    Dec 1969

    Default RE: close recordset problem

    You don&#039;t need a recordset. Not for inserts or updates.<BR><BR>set dbcon=Server.CreateObject("adodb.connection")<BR>d osneydsn<BR>sqlstmt = "INSERT INTO tblevents (edatestart) VALUES (&#039;" & datestring & "&#039;)"<BR>dbcon.execute sqlstmt<BR>dbcon.close<BR><BR>Craig.

Posting Permissions

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