Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion from VFP to SQL Again
Message
De
25/01/2005 02:36:39
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00980006
Message ID:
00980283
Vues:
36
>I am converting a VFP application to target SQL, and maybe even later
>Oracle databases.
>
>The GUI is tested and stable, and other than replacing the table access
>commands with calls to BizObjects, I would like to limit the amount of
>work that has to be done there.
>
>What I would like to do is create a Data Access Class that allows me to
>get the data back in a known structure, regardless of the structure of the
>data on the back end.
>
>What I mean is this. The VFP database has a Customers table with the
>following structure.
>
>
>RecordId N(4)
>First    C(20)
>Last     C(20)
>
>
>When the SQL database is designed, the decision might be made to set up
>the Customers table like:
>
>
>RecordId int
>FName    varchar
>LName    Varchar
>
>
>Since the field names have changed, the BizObjects and the GUI would then
>have to be changed to account for this.
>
>If the application is then later pointed to Oracle, and the structure again
>changes, the GUI and BizObjects would again need to be changed.
>
>Assuming I use CursorAdapters in the Data Access Class, how can I ensure the data
>is returned to the BizObjects in a consistant structure? I would prefer not to use the
>SELECT FieldName AS FieldName contstruct.
>
>Thanks

Kevin,
CA has a CursorSchema property to map fieldname and types. Do not forget to set corresponding parameter in Cursorfill() to .t.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform