What's with this error

Results 1 to 2 of 2

Thread: What's with this error

  1. #1
    Join Date
    Dec 1969

    Default What's with this error

    Microsoft VBScript runtime error &#039;800a005b&#039; <BR><BR>Object variable not set <BR><BR>/Pilot/Insert&Edit_Test/Update_Action.asp, line 57 <BR><BR><BR>Here&#039;s my code, it updates the row but is unable to redirect to the right page because of the error message<BR><BR>&#060;%<BR>Dim QUid<BR>Dim SQL<BR>Dim Conn<BR>Dim ObjCmd<BR>Dim adCmdText<BR><BR>adCmdText = 1<BR><BR><BR>Request.Form("QUid")<BR>Response.writ e QUid<BR><BR>If Request.Form("Action") = "Update" then<BR><BR>&#039;Building the Update String<BR><BR>SQL = "Update PILOT_QUIZ_QUESTIONS Set " &_<BR><BR> "QuestionText = &#039;" &_<BR> CStr(Request.Form("QuestionText"))& "&#039;"&_<BR> <BR> <BR> <BR> "Where QuestionNumber = &#039;" &_<BR> (Session("QuesNum")) & "&#039;"<BR> <BR> Response.write SQL<BR> <BR> &#039;Creating an opening the database object<BR> Set Conn = Server.CreateObject("ADODB.Connection")<BR> Conn.Open "DSN=ITO;UID=sa;PWD=;"<BR> <BR> &#039;Creating the Command Object<BR> Set ObjCmd = Server.CreateObject("ADODB.Command")<BR> <BR> &#039;Set the command object properties<BR> Set ObjCmd.ActiveConnection = Conn<BR> ObjCmd.CommandText = SQL<BR> ObjCmd.CommandType = adCmdText<BR> <BR> &#039;Execute the Command<BR> ObjCmd.Execute<BR> <BR> &#039;Close and dereference the objects<BR> Set ObjCmd = Nothing<BR> Conn.close<BR> Conn = Nothing<BR> <BR> response.redirect("UpdateConfirm.asp")<BR> <BR> End if<BR>%&#062;

  2. #2
    Join Date
    Dec 1969

    Default RE: What's with this error

    ---&#062;<BR>&#039;Close and dereference the objects<BR>Set ObjCmd = Nothing<BR>Conn.close<BR>Conn = Nothing<BR>&#060;---<BR><BR><BR>look at this: ---&#062; Conn = Nothing<BR><BR>should be : ---&#062; Set Conn = nothing<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