Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie SQL Update question
Message
From
26/02/2004 15:36:19
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00881227
Message ID:
00881234
Views:
28
How are you accessing the SQL Data. If you use the CursorAdapter and have a cursor generated via the CursorAdapter you simply issue a TableUpdate() and the records are updated. If you are using VFP8 perhaps you should consider using CursorAdapters. Mark McCasland (I hope that is the correct spelling) has created an excelent CursorAdapter builder that he freely distributes via his website http://www.mctweedle.com. The builder will walk you through the creation of the CursorAdapter classes. The best part about it is that a lot of people are using it and a lot of issues/questions have been resolved on this forum. I don't think the Builder supports SQL Stored Procedures though.

Aloha,

James


>I have been working in xbase for over 20 years with just the DBF tables and am now trying to move to the SQL world. Most SQL stuff I can do with no problem but this one has me stumped. Most of our data is setup as two tables. ie An invoice header table such as IVINVT and an invoice line table (IVINVTLN). When the user edits the lines we use a SQL to gather all the lines into a cursor and put it in grid for display/edit and then have always used a scan / endscan to write the records back to the line table. There can be more or less lines in the cursor than are in the origial table when the user saves it. What SQL syntax would I use to write the lines back if I am using MS SQL, MySql, Firebird, etc? (We are still evaluating which SQL engine to use.) Would I have to write each rec back one at a time or is there one command that will update the database, updating existing records, adding new records and deleting exra records?
>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform