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
**************************************************
***m_ntf
lc_file = Sys(2015)
mfdate = Thisform.Hspageframe1.Page3.hscntname.hstxtfdate.Value
mldate = Thisform.Hspageframe1.Page3.hscntname.hstxtldate.Value
mcfdate = Dtoc(mfdate)
mcldate = Dtoc(mldate)
m.lcxn = ("Driver={SQL Server}; Server=<server.name>;
Database=<databasename>; Uid=<userid>; Pwd=<password>")
m.lih = Sqlstringconnect(m.lcxn)
**************************************************************************
lc_selectcommand = "select
pk_ntf,postdate,firstname,lastname,email,damname,foalname FROM hsf_ntf where
postdate between ?mcfdate and ?mcldate"
**************************************************************************
SQLExec(m.lih,lc_selectcommand)
If Reccount() < 1
Messagebox("No records found",64,"Notice")
Return .F.
Thisform.Refresh
Else
Copy To &lc_file
Use &lc_file
Go Top
SCAN
m_pkntf = pk_ntf
m_postdate = postdate
m_firstname = firstname
m_lastname = lastname
m_email = email
m_damname = damname
m_foalname = foalname
INSERT INTO nametfoal ;
(pk_ntf, ;
postdate, ;
firstname, ;
lastname, ;
email, ;
damname, ;
foalname) ;
VALUES ;
(m_pkntf, ;
m_postdate, ;
m_firstname, ;
m_lastname, ;
m_email, ;
m_damname, ;
m_foalname)
ENDSCAN
***update tables*********************************
llok = Tableupdate(1,.F.,'nametfoal')
If ! llok
Aerror(laerr)
Messagebox(laerr[1,2],16,'Table update failed')
Endif
Messagebox("Records updated.",64,"Notice")
***update tables*********************************
Endif
Use In &lc_file
MFILE = Alltrim(lc_file) + ".DBF"
Erase Upper(MFILE)
Thisform.Hspageframe1.ActivePage = 1
Thisform.Refresh
James E Harvey
M.I.S.
Hanover Shoe Farms, Inc.
www.hanoverpa.com
office: 717-637-8931
cell: 717-887-2565
fax: 717-637-6766
-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Virgil
Bierschwale
Sent: Thursday, June 20, 2013 4:06 PM
To: 'ProFox Email List'; [email protected]
Subject: RE: Consider being a sponsor of SWFox
Dang, I wish I had a few thousand bucks as I would like one of those gold
exhibitor deals for Keep America At Work
And sugar daddy's is still probably doing a bang up business along with the
salty senorita or margarita or whatever it was called.
had a blast when I was in Scottsdale for about 6 months
-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Kevin Cully
Sent: Thursday, June 20, 2013 2:54 PM
To: [email protected]
Subject: Consider being a sponsor of SWFox
Hello fellow Fox Professionals,
I'm not able to attend SWFox this year ... but I want to show my support of
this excellent conference and I'm willing to put my money where my mouth is.
I've just signed up as a Bronze level sponsor. If you can attend the
conference, I strongly suggest that you do so. It's well worth it. If
you're not able to attend, I suggest you become a sponsor! You may get some
business out of it.
They have a new Consultant level sponsorship for what I consider a bargain
price of $150. If you are an independent consultant and are looking for
referrals in the Fox technical world, I can't think of a better way of
advertising your services. Cheaper than the Yellow Pages or Google, I can
assure you.
http://swfox.net/sponsors.aspx
Take care,
Kevin
--- StripMime Report -- processed MIME parts --- multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
_______________________________________________
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/[email protected]
** 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.