>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement