Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Server Table Update
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00605365
Message ID:
00653932
Views:
16
John,
Try changing buffering to be 5 (table buffering). When you use row-level buffering, the data is committed to the underlying table (in this case the remote backend) when you move the record pointer (update moves the pointer). If you use table buffering, you decide when to commit the changes when you issue the TableUpdate().

HTH.

>I am trying to do something I think should be simple. I have a Remote Connetion to a SQL Server 2000 DB table and I'm trying to update three fields in it from info located in a VFP table.
>
>What I am doing is selecting all the records from the VFP table that need to be updated in the SQL table. Once I have that resultset (cursor) I select it and start scanning though it as below:
>
>SELECT c_PaidInvoices
>LOCATE
>SCAN ALL
> UPDATE tblSales ;
> SET dtepaid = c_PaidInvoices.dtepaid, ;
> paid = .T. ;
> WHERE invno = c_PaidInvoices.invno
>ENDSCAN
>
>It seems simple enough to me but at some point I start to get an "Update Conflict (Error 1585)". I suspend the program and do a "= TABLEUPDATE(.t., .t.)" which works. But now I am getting a "Function Requires Row or Table Buffering mode (Error 1586)" Buffering is set to 3. The UPDATE statement will update more than one record since each invoice can have multiple lines. I'm not sure if that is an issue. The key fields for the tblSales view are the invno and line_no fields. In the "Connection Designer" under "Data Processing" the Batch Processing and Automatic transactions are checked.
>
>In the "View Designer" for tblSales the Update Criteria has the "Send SQL Updates" checked and all fields selected to be updated. The key fields are invno and line_no. "Update using" is set to "SQL UPDATE"
>
>Does anyone have any suggestions on what I need to do to resolve this problem?
>
>Thanks in advance,
>John Gundrum
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform