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
It would help to see how you are formatting your startdate variable and it should be in quotes. Brian Erickson -- "Who is John Galt" -- Original Message -- From: "John J. Mihaljevic" To: profoxt...@leafe.com Sent: 1/10/2013 9:28:37 PM Subject: Error execut