Hi,
 
I am converting an asp page to witango and am trying to use the COM object the asp uses in Witango. Has anyone passed an Witango array to a COM object.  I have been have successful in using COM objects except this one, which is has a parameter in an array format.  Here is the function code from the asp page:
 

Function InitSearchTracking

Dim SearchTracking

Set SearchTracking = Server.CreateObject("CTRKSearch.TrackingItem")

Set InitSearchTracking = SearchTracking

End Function

Function CreateSearchTracking(UsrId, FldId, Qry, Name, ByRef SearchTrackingObj)

Dim Success, QueryArray(1), Key

QueryArray(0) = CLng(UsrId)

QueryArray(1) = CLng(Qry)

Set SearchTrackingObj = InitSearchTracking

SearchTrackingObj.InitNew myConnection, myDatabaseType, UsrId, FldId, "", "", Now

SearchTrackingObj.AddQuery QueryArray

SearchTrackingObj.Commit Success

CreateSearchTracking = Success

End Function

In Witango, using the COM object, the 'SearchTrackingObj.InitNew myConnection, myDatabaseType, UsrId, FldId, "", "", Now' statement works correctly.

The COM object for  the  'SearchTrackingObj.AddQuery QueryArray' does not.

I have replaced these asp statements:

QueryArray(0) = CLng(UsrId)

QueryArray(1) = CLng(Qry)

with this Witango statements:

<@ASSIGN NAME="vQueryKey" VALUE="<@ARRAY ROWS='2' COLS='1' value='@@request$vusrid;@@request$vqrynum'>" SCOPE="request">

Which produce an array

84
166

The parameter in the CTRKSearch.TrackingItem object is text format.

The Witango error that I get in debug mode is:

[Query] [2551] [Invocation of method "Invoke:AddQuery" of object "COM://CTRKSearch.TrackingItem?Class=TrackingItem:Request$TrackingItem" with parameters [QueryKey=<@__REF name=vQueryKey userref=__B21781D45E95714742383138>]
[Error] [2623] -806 An unspecified method call error occurred. TrackingItem
[Error] [2623] -801 An error occurred while invoking this method. TrackingItem
[Error] [2623]
-801 CTRKSearch.TrackingItem Invalid argument
 
 

Ted Wolfley
Database/Internet Programmer
The Ogden Group of Rochester
phone: (585) 321 1060 x23
fax: (585) 321 0043
[EMAIL PROTECTED]

www.ogdengroup.com

 
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to