Error Closing a connection

Results 1 to 2 of 2

Thread: Error Closing a connection

  1. #1
    Jason Guest

    Default Error Closing a connection

    I have a simple update string that reads as follows:<BR><BR>sqlDoublesWinner1Update = "update Members set DoublesRating = " & vNewWinner1NewRating & " Where MemberID = " & varWinner1ID & ""<BR><BR> sqlDoublesWinner1Update, oConn<BR><BR>Then when i go to close:<BR>orsDoublesWinner1Update.Close<BR>set orsDoublesWinner1Update = Nothing<BR><BR>I get an error that says:<BR>"Operation is not allowed when the object is closed"<BR><BR>The statements are not included in any sort of loop or if/then statements. What would cause that? I am executing before closing. What am I missing?<BR><BR>Jason

  2. #2
    Join Date
    Dec 1969

    Default errors

    First thing in the sql u dont need the "&" in the end unless u have more statement to come after &. so the sql should be :<BR>&#062;&#062;start sql&#060;&#060;<BR><BR>sqlDoublesWinner1Update = "update Members set DoublesRating = " & vNewWinner1NewRating & " Where MemberID =" & varWinner1ID<BR><BR>&#062;&#062;end sql&#060;&#060;<BR>also shuffle these lines:<BR>orsDoublesWinner1Update.Close<BR>set orsDoublesWinner1Update = Nothing<BR>bring the second one to the first line.<BR>you can not set an object to anything if you have already closed the object, for that you will have to open it again which of course is not desired here, so just move your lines.<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