Re: SQL Insert into Remote Views by Anders
Anders
Wed Jan 03 05:00:33 CST 2007
Create an updatable remote view. Open the view, set buffering to 5 - Table
or 3 - Row, then modify rows and insert new rows into the view (which is in
effect a VFP cursor). If you have set Table buffering, call TableUpdate() to
have VFP execute the transfer to the backend. If you have set Row buffering,
the transfer is performed when you change rows in the cursor.
Another method uses SQLEXEC(connectionhandle, 'UPDATE or INSERT SQL
command' )
For batches use a loop through the VFP cursor. GetNextModified() and
GetFldState() can specify what has been changed in the VFO buffered cursor.
OldVal() and CurVal() determine if another user has also made changed to the
same row in rthe same table.
-Anders
"sim" <sim3030@streamyx.com> skrev i meddelandet
news:459b2355$1_1@news.tm.net.my...
> CJ
> > Can give me guideline how to do INSERT/UPDATE for batch of records ?
>
> Regards
> Hoe
>
>
> "CJ" <chebert@rvmags.com> wrote in message
> news:O2N$XQrLHHA.960@TK2MSFTNGP04.phx.gbl...
>> thanks Anders....
>>
>> i have everything working, just dont like the view access methodology i
>> have to use when inserting a new record...
>>
>> thats ok though since the migration is away from vfp commands like
>> replace, append, scatter, gather, etc... and use real sql stored
>> procedures with updates, inserts, etc...
>>
>>
>>
>
>