Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP Com Object in ASP page
Message
De
26/08/2004 10:59:02
 
 
À
26/08/2004 10:53:30
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00936612
Message ID:
00936620
Vues:
26
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform