Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter with old style DBF
Message
De
16/12/2002 11:00:03
 
 
À
16/12/2002 08:33:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00733263
Message ID:
00733295
Vues:
21
Hi Nesimi.

>What is best way operate FPW26 data via CursorAdapter. (Because of We dont think change some old app, we can't convert data to new format that support DBC )

- Set the CursorAdapter DataSourceType property to "Native"

- Put a SQL SELECT command to retrieve records from the FPW26 table into the SelectCmd property (for example, "SELECT * FROM SOMETABLE")

- Set the Tables property to the name of the table (for example, "CUSTOMER")

- Set the KeyFieldList property to the name of the key field for the table (for example, "CUST_ID")

- Set the UpdatableFieldsList property to a comma-delimited list of fields that can be updated (for example, "NAME, ADDRESS, CITY")

- Set the UpdateNameList to a comma-delimited list of fields in the cursor and in the table (for example, "CUST_ID CUSTOMER.CUST_ID, NAME CUSTOMER.NAME, ADDRESS CUSTOMER.ADDRESS, CITY CUSTOMER.CITY")

You can then treat the CursorAdapter like a regular Cursor object: it will create a cursor of the FPW26 table, you can browse or edit it, and when you use TABLEUPDATE(), any changes will be written back to the table.

Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform