Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INSERT-SQL
Message
From
16/08/1997 07:08:39
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00044588
Message ID:
00045106
Views:
43
>>>So all records have to be copied from the source table to an array first then inserted into the target table. I forget which one only locks file header versus locking the entire file (shared file use), either inserting records or appending from.
>>The file has to be locked with both insert and append, because the record counter is in the header. Also, I believe that insert is supposed to be much faster.
>
>Curiosity got the best of me, and I had to look this up. In Jeb Long's VFP 3 Developer's Guide is a chart of how commands are affected by autolocking
>(pp 1269-1270). *Append From* locks the table , Append From Array, Append Blank and Insert (SQL) all lock the header only. Granted, both effectively lock the table and prevent new attemts by users to lock either the table or the header (but should not prevent new attempts at record locking). But, if another user on the system has an existing record locked for editing, you could still use the Insert SQL to add records to the table without affecting the other user(s) who have only record locks in place. You could not do this with *Append From*. So in a heavily used multi-user system, Insert SQL is the way to go (IMHO) to prevent some contention.
>
>Of course, much of this has been alleviated by table buffering. And, VFP does very well managing automatic file and record locking when used with buffering.

I have read pretty much the same thing in the VFP documentation. But I haven't been able to find an example of how to use INSERT-SQL to insert multiple records. Can someone tell me how to do this?

TIA
Bill Chadbourne
wchad@ime.net
William Chadbourne
Senior Programmer/Analyst
State of Maine - DAFS App Team

Oracle - When you care enough to use the very best!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform