Information générale
Catégorie:
Codage, syntaxe et commandes
>Hi,
>
>1. I created a CA object.
>2. Created a cursor with the exactly the same structure as the CA cursor. Call it 'new' cursor
>3. Detached the 'original' cursor from CA.
>4. Updated the 'new' cursor created in step 2 above (in code). For example, replace field_abc with '123'
>5. Attached the 'new' cursor created in step 2 to the CA object. Checked that the cursor still have the value set in code (field field_abc '123').
>6. Executed TableUpdate(.t.). No error. But the SQL table didn't get updated.
>
>My understanding of the problem is that CA relies on Buffering (optimistic, 3). So when I attached a 'new' cursor to the CA, the TableUpdate() does not "see" any changes. So it does not update anything.
>
>I need to figure how to "force" the CA to update the underlying table. I did try setting the SendUpdates to .T. but to no avail.
>
>Any suggestions?
>
>UPDATE: The bottom line is that unless the changes to the cursor done WHILE IT IS ATTACHED, the TableUpdate(.T.) will not update the base table. The changes made to the cursor WHILE IT IS DETACHED are not sent to the DB when TableUpdate(.T.). If anybody knows how to get around it, I would greatly appreciate it.
See my message in other thread ;-))
Précédent
Suivant
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