>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