Michael, Thanks very much. The code worked flawlessly. I haven't tried a date yet but I have no doubt it will work. Very nice solution.
Thanks, again! Bill -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of MB Software Solutions General Account Sent: Thursday, April 02, 2009 10:10 PM To: [email protected] Subject: Re: MySql Insert fro VFP9 W.N. Pew wrote: > Hi, again! > > > > Well I overcame the problem with YAHOO! I installed WAMPSERVER on my > machine. Dead easy! > > > > I can connect and I can select with no problem. However, I'm messing up the > formatting of the INSERT command I'm sending through the SQL pass through > (SQLEXEC()). > > > > Here's what I have: > > > > mid = 3 > > mfnam = "Bob" > > mlnam = "Smith" > > musernam = "binky" > > mpzwd = "tryit" > > mlvl = 2 > > > > After connecting I issue: > > try= SQLEXEC(junk, "insert into sec > values(&mid,&mlnam,&mfnam,&musrnam,&mpzwd,&mlvl)") && junk is the connection > handle > > > > Not sure what I'm doing wrong but I'm getting a syntax error back from > MySql. > > > > Anyone got any ideas? TEXT TO lcSQL PRETEXT 2 NOSHOW TEXTMERGE INSERT INTO MYSEC (MyNumeric,MyString,MyDate) values (<<lnNumber>>,'<<ALLTRIM(lcString)>>','<<DTOC(ldDate,1)>>') ENDTEXT liResult = SQLEXEC(liHandle,lcSQL) or you could use the ?variables approach. That's the best way to do it, imo....ymmv. TEXTMERGE is GREAT!!! [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://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.

