General information
Category:
Coding, syntax & commands
>I have read several places where I should not use the APPEDN FROM commnad in code. They suggest that this is a command window command. What else should I use? I have used INSERT-SQL for one line of MEMVAR. This does me no good when the table I have has numerous records in it and I don't know how many. I tried the ARRAY thing but never really have a lot of success with that. What else can I do?
HTH
Select Table_A && Source table
Go Top && Position the record pointer where ever you want it
Scan && You can put an optional For < expression > to control which records your scan actually lands on
< Put insert statement here >
EndScan
Typically this scans/inserts the entire table. But there's a lot of flexibility with this code. If the table you're inserting into is a remote SQL table ( Oracle or SQL server etc. ), this is about as fast as you can go if your source table is a CURSOR or VFP table since even bulk inserts from VFP6x tables/cursors are sent one row at a time into MS SQL Server. (You can confirm this with SQL Profiler.)
If you are using ADO records sets, then you can do a bulk update from the recordset object.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only