Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object vs. array?
Message
De
27/08/2009 03:31:28
 
 
À
25/08/2009 20:57:42
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01420180
Message ID:
01421122
Vues:
63
>>>and never mention sys(2023) again, but that's a minor point. The major (or rather a colonel) point is that you're copying to a free table, thus losing long field names you may have had in the cursor.
>>
>>
>>Actually this is first time I ever saw or used sys(2023)
>>I normally use getenv('TEMP') , but as I was looking through list of sys functions to find sys(2015) I spotted this one
>>and thught; Ok... will do the trick for this code sketch.
>>Now, pls reveal the mystery. What a heck is wrong with sys(2023) ? :))
>
>It's a function and you're calling it four times instead of one. Picajzla ostaje picajzla :).


Oh that... I thought there was some problem with function in itself. Like returning wrong results occasionally
or smething like that.
As far as implementation of this possibility goes, I wld probably wrapp it all up (again) in two functions
for each side of the story, but this codebits were offered just as an idea/sketch.

>
>How about a property which would hold a schema... i.e. make this object a cursoradapter without an attached cursor... then use the schema to build one and populate it from array? Then you can have any number of extra goodies on your cursor - even an aTagInfo() array as yet another property to build indexes from on the receiving end. The whole package. Or, simpler, a script which would be execscript()ed on the client side, which would contain a Create Cursor command? That would be cool.

This is more or less idea/concept. Class object does most of the stuff, but it is all wrapped in a pair of functions for ease of use.
You use one function in source session to 'pack' cursor into an object, then pass reference of that object to receiving session
and then counter function erects fully blown cursor again on the other end. No need running any scripts at all.
BTW aTagInfo() is not bad idea at all. It is class, so there can be more things added. Like pooling captions from DBC
if it is a DBC table, or adding an extra field for record level instructions for client session etc.
Source is there, sizzle & spice according to your own taste :)
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform