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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement