Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Handling ODBC Errors with CursorAdapter
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00797306
Message ID:
00811865
Vues:
28
>>And now have tested this on my Remote Views using Oracle 9 and Client Access for DB2 ODBC drivers and I get " Update Conflict" and Tableupdate() returns .F. when I try to update deleted record.
>
>>And when I tested the example on bottom of page 6 in the Code Magazine Article on my remote views, I was not able to produce the same results as it reported for CursorAdapters. Tableupdate() did always return false when the update was unsuccessful and true when the update was successful.
>
>>So my conclusion is that Remote Views using Oracle 9 and Client Access for DB2 ODBC drivers handle updates correctly.
>
>It's the same conclusion I got!. CursorAdapter is nice concept, but doesn't replace the use of Remote Views (yet).

I think the solution to our issue on this can be found with this recent reply:

Re: ODBCs SQLRowCount() - How to use? Thread #810276 Message #811151

With the CursorAdapter, we can turn off the AutoUpdating and use function calls for our Insert/Update/DeleteCmd properties. In the BeforeInsert/Update/Delete events, one of the parameters VFP passes to the method is the SQL command about to be issued. This SQL could be passed to your function which uses SQLExecDirect to run all your SQL followed by SQLRowCount to get the count of rows affected. Your function then returns that value.

I do know the code modified slightly works with Oracle, but I have not tested with a CA yet. Sound like a possible solution?
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform