Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
3-Tier programming: Where to put code tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00155026
Message ID:
00155181
Vues:
27
>Assuming that you want to use VFP as the third tier because of the speed of VFP and your familiarity with it, I suspect that you will meet disappointment with your plans.
>
>I say this because there is no practical way to pass a record set back-forth between tier-2 and tier-3 using VFP. Yes, some suggest that you can use ADO for that, but that will *not* be nearly as fast as native VFP and you are not likely anywhere near as familiar with ADO as you are with VFP. As an aside I seem to recollect a few threads recently asking 'how to use ADO for . . .using VFP' and the answers seemed to be along the lines of 'you cannot yet. . .'.
>
>One way or the other you will find that you have to (using native VFP in tier-3) do a lot of parsing of long string fields or step through array elements (you can now pass arrays with VFP 6). Either technique is sensitive to table field layouts, requiring a programming change whenever any field is added or removed from a participating table.
>
>Have fun with it,

I am using native VFP on the backend for the speed. The data is accessed via views in my DBC. I am open to using ADO, but if would use it, I would do the data component in VB. Unfortunately, my views are parameterized, and I was unable to ADO initialize the view parameters. Anyway, that is another thread and another story. :)

The way I am passing my data back and forth is through a VB object. The data structure with this object currently looks like this:

Private Type ListType ' List data type
oData As New Collection ' Collection to hold records
nSQLRecords As Integer ' Actual records from query
nStatus As Integer ' Status code
End Type

Each record is stored into a collection. In VFP or ASP, I can do a CREATEOBJECT and load up the collection, or I can receive the object and extract the data. So far it seems to work. I have not used it for *real*, but I am having fun with it. :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform