Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie question on CA
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01472577
Message ID:
01472580
Views:
70
>Hi,
>
>I am working on a very simple use of CA (CursorAdapter) and have a newbie question. What method of the CA do I call to send the update to the data source (SQL Server)? For example, I set values of the properties to the CA, get the cursor (calling CursorFill), change values of one or more fields of the records in the cursor. Now I want to update the SQL Server table. How? TIA.


TABLEUPDATE() function.

But I would create my own class based on CA and have a method in it named UDPATETABLE() (or whatever name you prefer) that will handle the errors also.
Something like:
*** UpdateTable() method
LOCAL loArray[1]
IF NOT TABLEUPDATE(1, .t., this.Alias)
   AERROR(loArray)
   MessageBox([Can not update cursor:] + this.Alias+CHR(13)+;
              [Reason ]+loArray[1,2])
   TABLEREVERT(.t., this.Alias)
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform