CHeighlund
Programmer
I'm working on a program designed for deleting some files from a postgresql database. We've already got a copy of this in perl, but my boss says the perl one sometimes deletes records it shouldn't be deleting; I thought I'd recode in delphi and see if that had the same problem, or at least see if that got rid of the same records or not.
I'm using the Zeos components TZConnection and TZQuery for the database side, but I'm running up against an error in communications somewhere along the way. The program is only supposed to look at records older than two years from the present; the perl-side prog handled this with a "dt < now() - '2 years'::interval" statement, but the delphi program I'm working with blargs at one of the : characters; the error is 'syntax error at or near ":" at character 509'. I know the code works if put straight into the db, as I spun out a memo box to catch it, then copied the contents of the memo straight into the database. It took a while (a lot of records match the criteria), but it ran without any errors as far as I can tell...that is, I got meaningful results back.
Does anyone know what I would need to do to handle this? Are there other components that can handle the ::interval effect I need, or should I be looking into ways to work around that?
I'm using the Zeos components TZConnection and TZQuery for the database side, but I'm running up against an error in communications somewhere along the way. The program is only supposed to look at records older than two years from the present; the perl-side prog handled this with a "dt < now() - '2 years'::interval" statement, but the delphi program I'm working with blargs at one of the : characters; the error is 'syntax error at or near ":" at character 509'. I know the code works if put straight into the db, as I spun out a memo box to catch it, then copied the contents of the memo straight into the database. It took a while (a lot of records match the criteria), but it ran without any errors as far as I can tell...that is, I got meaningful results back.
Does anyone know what I would need to do to handle this? Are there other components that can handle the ::interval effect I need, or should I be looking into ways to work around that?