Closing object errors ?!?

Results 1 to 2 of 2

Thread: Closing object errors ?!?

  1. #1
    Join Date
    Dec 1969

    Default Closing object errors ?!?

    Hi I keep on getting errors when I close my objects after insert statements, the thing I can&#039;t understand is that this happens regardless of the fact that the close object lines are at the end of the script. <BR><BR>What is the correct procedure to handle this.<BR><BR>This is the code I am told to put at the end of the script.<BR><BR>MyRS.close<BR>Set MyRs = Nothing<BR>MyConn.close<BR>Set MyConn = Nothing<BR><BR>If I remove the close methods it works HOWEVER is setting the obect to nothing doing the job, I somehow don&#039;t think so.<BR><BR>Thanks <BR><BR>Dwane Lumley

  2. #2
    Michael T. Gercevich Guest

    Default RE: Closing object errors ?!?

    Try this...<BR><BR>If NOT MyRS.State = 0 Then<BR> MyRS.Close<BR>End If<BR>Set MyRS = Nothing<BR>If NOT MyConn.State = 0 Then<BR> MyConn.Close<BR>End If<BR>Set MyConn = Nothing<BR><BR><BR>Hope this helps...<BR>-Mike Gercevich

Posting Permissions

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