General information
Category:
COM/DCOM and OLE Automation
As far as I know you can't return a VFP collection class from a com object and use it in ASP. Try returning an ado recordset or an xml string.
>I've created a Multi-Threaded DLL out of the below and installed it in Component Services.
>If I create the object from an ASP page with VBScript, it runs fine the first 7 or 8 times.
>Then it consistently returns an error.
>Help. Is there any reason you can't return a collection and access it from VBScript in the ASP page?
>Is there anything special I should be doing in the ASP page?
>
>
>DEFINE CLASS Location AS Session OLEPUBLIC
> NAME = 'Location'
> cDataPath = "G:\xxx\data\"
>
> FUNCTION INIT
> SET TALK OFF
> SET RESOURCE OFF
> SET CPDIALOG OFF
> SET DELETED ON
> SET EXACT OFF
> SET SAFETY OFF
> SET EXCLUSIVE OFF
> SET REPROCESS TO 2 SECONDS
> SYS(2335,0)
> RETURN
> ENDFUNC
>
> FUNCTION GetLocationList as Object
> LOCAL loTable AS COLLECTION, loRecord AS OBJECT
> loTable = CREATEOBJECT("Collection")
> SELECT Loc_PK, Loc_Name from (this.cdatapath + "LOCATION") into cursor curTEMP
> SCAN
> SCATTER NAME loRecord
> loTable.ADD(loRecord)
> ENDSCAN
> RETURN loTable
> ENDFUNC
>ENDDEFINE
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only