Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP Com Object in ASP page
Message
De
26/08/2004 11:20:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00936612
Message ID:
00936635
Vues:
22
See my reply to James.
**So it successfully returns the collection 6 or 7 times and then errors out?**
Yes correct. But the error doesn't happen in the dll. Everything in the dll seems to run fine.
On the 8th page hit the VBScript errors with

Microsoft VBScript runtime error '800a01a8' Object required /includes.asp line 17
option VALUE="<%=objLocation.Loc_PK%>"><%=objLocation.Loc_Name%>



>So it successfully returns the collection 6 or 7 times and then errors out? Make sure you use COMRETURNERROR in your error handler. That should give you a better idea of what the error is and not crash the app. It sounds like possibly a conversion problem, but, if it runs ok for a few times, then maybe not...
>>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