>Can you use SQL pass through with a select statement taking data from a VFP table??
>
>Example:-
>lnResult=SQLEXEC(lnSqlHandle,"INSERT INTO sqltable SELECT * FROM vfptable)
>
>The VFP table will contain up to 100k rows. If this is possible, how would I reference the table - do I use the ? prefix??
>
>I am currently using a remote view and appending from the VFP table - I don't like it, something inside me tells me this is not right! Even though it solves all my problems!
I think what you can do is wrap your SPT with a scan...
use VfpTable
*get connection here
*start transaction if needed
scan
SCATTER TO aMyArray
lnResult=SQLEXEC(lnSqlHandle,"INSERT INTO sqltable FROM aMyArray")
endscan
*********
I haven't tested this... don't know if you can insert from array with SPT... you may have to scatter to memvars an use the VALUES clause... but, this remove the use of the view.
BOb
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