0
  'IN
  dim par_hint_id 
  dim par_proposed
  dim par_taken   
  dim par_comment
  dim par_chg_by  
  'OUT
  dim par_status_message
  dim par_status  
  
  par_hint_id  = Request.Form("par_hint_id")
  par_proposed = Request.Form("par_proposed")
  par_taken    = Request.Form("par_taken")
  par_comment  = Request.Form("par_comment") ' empty string
  par_chg_by   = Request.Form("par_chg_by")

  Dim cont
  Dim status
  
  set cont = CreateObject("IvrContacts.Contacts") 'COM+ object
  set status = cont.SetHintFeedback(par_hint_id, par_proposed, par_taken, par_comment, par_chg_by, par_status_message)

Everything works fine until an empty string comes to the parameter par_comment. If an empty string comes up, it generates such an error:

Microsoft VBScript runtime error '800a01a8'
Object required: '[string: "0"]'

How do I fix this?

user692942
  • 16,398
  • 7
  • 76
  • 175
Vilius Gaidelis
  • 430
  • 5
  • 14
  • 2
    If you do `par_comment = "" & Request.Form("par_comment")`, does the error go away? – Flakes Apr 11 '22 at 17:23
  • If par_comment = "0" , shouldn't it result in a NULL or "" not literally ZERO? You could also try to hard code it to something par_comment = "TEST" and then see what happens? If that stops the error, we can if/then our way out of this easy. – easleyfixed Apr 11 '22 at 22:35

0 Answers0