WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Unsupported Variant Type Error With Concatenation

 Keywords: 1702 Unsupported Variant Type Error COM OLE Concatenation Colon Operator 

Question:

I maybe using the : concat wrong but I get a 1702 Error: Unsupported Variant Type (nothing in WWWBATCH.INI). If you comment out that line and use the STRCAT line it works fine.
      document.open()
;      document.writeln(strcat("<h2>Location Information</h2>" , "<p>" , shtml , "</p>")) ; this works
      document.writeln("<h2>Location Information</h2>" : "<p>" : shtml : "</p>")     ; this fails
      document.close()

Answer:

Admittedly, this is not documented clearly but it is not a bug. The single colon (:) is an overloaded operator in WinBatch because it is both a type indicator and the string concatenation operator (yes, there is a third use but that is not relevant here.)

If you want to use the concatenation operator in a COM method parameter, you need to specify the parameters type first so that the parser will interpret the rest of the colons as the concatenation operator. The line should be

   document.writeln(:"<h2>Location Information</h2>" : "<p>" : shtml : "</p>")

Article ID:   W18025
Filename:   Un supported Variant Type Error With Concatenation.txt
File Created: 2009:04:17:10:53:56
Last Updated: 2009:04:17:10:53:56