Re: Error executing SQL commands on a SQL table

2013-01-11 Thread Frank Cazabon
r suggestions! All were very helpful. John -Original Message- From: Rafael Copquin [mailto:rcopq...@fibertel.com.ar] Sent: Friday, January 11, 2013 6:11 AM To: profox@leafe.com Subject: Re: Error executing SQL commands on a SQL table Your command should be written like s

RE: Error executing SQL commands on a SQL table

2013-01-11 Thread John J. Mihaljevic
opquin [mailto:rcopq...@fibertel.com.ar] Sent: Friday, January 11, 2013 6:11 AM To: profox@leafe.com Subject: Re: Error executing SQL commands on a SQL table Your command should be written like so: sqltxt='DELETE FROM DailyProductionFoxPro WHERE proddate>='+'{'+dtoc(startdate)+

Re: Error executing SQL commands on a SQL table

2013-01-11 Thread Frank Cazabon
or better yet (it is much safer to pass parameters): TEXT TO m.sqltxt TEXTMERGE NOSHOW DELETE FROM DailyProductionFoxPro WHERE proddate >= ?m.startdate ENDTEXT Frank. Frank Cazabon On 11/01/2013 07:10 AM, Rafael Copquin wrote: Your command should be written like so: sqltxt='DELETE FROM Daily

Re: Error executing SQL commands on a SQL table

2013-01-11 Thread Rafael Copquin
Your command should be written like so: sqltxt='DELETE FROM DailyProductionFoxPro WHERE proddate>='+'{'+dtoc(startdate)+'}' xstr=sqlprepare(cnTransfer,sqltxt) Rafael Copquin ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://ma

Re: Error executing SQL commands on a SQL table

2013-01-10 Thread Fred Taylor
Use the AERROR() function to return the SQL error. IF xexec=-1 AERROR(aErrInfo) ENDIF The aErrInfo array will contain why the SQLEXEC() function failed. Fred On Thu, Jan 10, 2013 at 9:28 PM, John J. Mihaljevic < john.mihalje...@gmail.com> wrote: > Hi all, > > I'm trying to execute command

Re: Error executing SQL commands on a SQL table

2013-01-10 Thread Brian Erickson
37 PM Subject: Error executing SQL commands on a SQL table Hi all, I'm trying to execute commands on a SQL table from with a VFP 6.0 application. Here's the section of code that's causing me problems: cnTransfer=sqlstringconnect(cnstr) cnTransfer has a value of 1, so the above comman

Error executing SQL commands on a SQL table

2013-01-10 Thread John J. Mihaljevic
Hi all, I'm trying to execute commands on a SQL table from with a VFP 6.0 application. Here's the section of code that's causing me problems: cnTransfer=sqlstringconnect(cnstr) > cnTransfer has a value of 1, so the above command and cnstr (my connection string) are apparently fine.