On Fri, Jun 21, 2013 at 5:51 AM, James Harvey <[email protected]> wrote:
> I've been able to download records from a MS SQL table on the web into a > local VFP table (see code below). > > Now I'd like to learn how to both update records and insert into records > into the MS SQL table on the web with records obtained from a local vfp > table using sql. > > Researching the web has not been successful, and I was hoping someone whose > done this could point me in the right direction for documentation on how > this is done. > > Jim > --------------- > You have two options. Presenting insert / Update statement one by one to SQL Server, you could make a big ole union and have one HUGE statement, or you can have vfp present an execute stored procedure call that supplies all the params necessary for that sproc. Below is a very simple Insert sproc for a table with 5 columns and one is an primary key generated on insert. Create PROCEDURE [dbo].[EDIErrors_ins] @ErrorID numeric (18,0), @ErrorDesc varchar (150), @NotifyCustomer bit, @NotifyAR bit, @ErrorType varchar (3) as Begin Insert Into [dbo].EDIErrors ( ErrorDesc , NotifyCustomer , NotifyAR , ErrorType ) Values( @ErrorDesc , @NotifyCustomer , @NotifyAR , @ErrorType ) end If you just want to put the insert statement to the db and not use the sproc that is between the Begin and End above. Update a SQL stable: Update EDIErrors set ErrorDesc = @ErrorDesc , NotifyCustomer = @NotifyCustomer , NotifyAR =@NotifyAR , ErrorType =@ErrorType where ErrorID = @errorID --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJidMYJqzbZG3uAFu=-tb-nnjRAWPumyX=8ww0ktpjwcwkr...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

