Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are CursorAdapters worth the trouble?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Are CursorAdapters worth the trouble?
Divers
Thread ID:
00882205
Message ID:
00882205
Vues:
48
I'm launching into a project to move a large set of applications from working against a vfp back end to working against a sql server back end.. and have been looking at cursor adapters as a possible step in that direction.

There are a lot of things I like about CA's: they combine some of the advantages of remote views and SPT. I like the consistent interface to vfp, sql server, and xml data, the fact that I don't need to have dbc's for remote views, the fact that they can call stored procedures, their performance (which seems comparable to SPT)

On the other hand, they are a pain to construct.. even aside from the 255 character property limitation.
We have a LOT of tables and remote views.
I've used Mark McCasland's CA builder to easilty create CA objects for the tables..
But creating them for views is a pain.. and there doesn't seem to be any simple way to adapt Mark's code to handle remote views (which are usually parametrized and sitting in a dbc separate from the tables themselves)..

The CA bulder that comes with VFP seems useless for anything but the most straightforward views.

Thus for example, trying to move even a simple view such as this one to a CA via the builder doesn't work:

SELECT Sh.shshipno, Sh.shshipweek, Sh.dypk, Sh.shpk, Sh.sgpk, Sh.destpk,;
Sh.capk, Sh.ohpk, Sh.shpo, Sh.shcarrierp, Sh.shmethodp, Sh.typestatus, Sh.pspk,;
Sh.whpk, Wh.whdescript, Sh.shfreight, Sh.shservice, Sh.sifobcode,;
Sh.sistatus, Sh.invoicenr,;
Ty.tydescript AS cfobcode, Sh.adduser, Sh.adddtime, Sh.edtdtime,;
Sh.edtuser, Gr.grdescript AS destination,
Sh.recstatus ;
FROM ;
ShipmentHeader Sh ;
INNER JOIN Warehouse Wh ;
ON Wh.whpk = Sh.whpk ;
INNER JOIN Type Ty ;
ON Ty.typk = Sh.sifobcode ;
INNER JOIN GeoRegion Gr ;
ON Gr.grpk = Sh.destpk;
WHERE Sh.ohpk = ( ?tOhPk );
ORDER BY Sh.shshipno

The builder seems to assume that join clauses will always be on fields with the same name?

I would love to see a program such as Mark's which would also handle parameterized remote views..

Am I missing something here? What do I really gain by going the CA route rather than sticking with SPT? Especially when going the CA route involves all this hassle (note that because of the 255 limit, I can't just simply populate the schema, update field list, etc properties.. but would need to do it programatically..)

Ilmar
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform