Why am I getting TypeMissMatchException in Socket.SetFormData

Hi,

Here is the code:

Function ProcessCC(dt as Dictionary, lbTesting as Boolean = True) As Boolean
  dim S as new HTTPSecureSocket
  Dim d As New Dictionary
  Dim Keys(), k, v as Variant
  
  
  '
  d.Value("x_email") = dt.Lookup("x_email", "")
  d.Value("x_card_num") = dt.Lookup("x_card_num", "")
  d.Value("x_exp_date") = dt.Lookup("x_exp_date", "")
  d.Value("x_card_code") = dt.Lookup("x_card_code", "")  
...  

  S.SetFormData(d)     <<<<<------ Getting TypeMissMatch Here

Can someone explain what I’m doing wrong?

Thanks Rich

Hmmm took your code & runs fine in 2014r1.1 here in various kinds of projects
I did change the dt.lookup lines to just insert string literals but I don’t get a type mismatch

Running on same version.

Strange indeed.

I’m going to Play a bit.

Is there other intervening code ?
Cant see that D could change types in between (that’d be a different error) but … “something” is messed up

I figured it out, still doesn’t explain that error.

One if the items in the passed dictionary was bing set to an object WebTextField. I forgot the “.Text”

Go Figure.

Thanks, you gave me the idea to look upstream.

AH
SetFormData is then trying to convert everything into values to send to the server & THAT’s the type mismatch when it tries to convert an object reference