A quick wild guess?
Your lookupkey is a string - and it wants a int or long number.
As a test, try: "select gte_badge from tblWhatever where ID = " & lookupkey
In this case, then lookey can be a string - it will not matter since you formed the sql string correct. However for numbes (no quotes), and for strings then the parmeter behind the scenes is automatic "quoted" for you. And the same goes for dates. So, you want the library code to do this dirty work.
if the lookup key value is a long/int value on the server side - then define that as a long in your code. The error message does give a hint here.
And this gets rather messay if a string is null. I call this the Java Schrödinger's cat issue! To look inside that null box, but as a string, then the word "null" is retuned.
So, if you were say to search for a null vallue in a column, you wold use:
Dim MySearchParm as Object
'bla bla code, and then:
MySearchParm = Null
If MySearchParm is a string, then null value will in fact get converted to the word "Null" and you search for a string called "Null".
So letting the routines do "type" conversion for you is rather nice - but you do have to match up the data types when doing this.
Edit:
And your parameters have to be typed to the correct type - not strings.
So, use a "list"
eg:
Dim v As List
v.Initialize2(Array As Object("Jasper","Albert","Kallal",123))
Edit:
Note how in above, the first 3 are strings, but the last value is NOT a string. The parameters are "different" types - they can't all be strings.
So, you can't use an array() of strings here. But a list of "different" types such has strings or integers should work.
Regards,
Albert D. Kallal
Edmonton, Alberta Canada[/code]