Subject Re: [IBO] Exception 335544334: conversion error from string "ABCDEFAA"
Author Helen Borrie
At 10:13 PM 22/06/2004 +0000, you wrote:

> > What happens if you use a string (e.g. '25-FEB-2005') instead of
>the field
> > name(?) "25-Feb-2005" ? (Depends on Dialect, I believe).
>same exception. Here's my Delphi code that creates the SQL:
>lIBQ.SQL.Text :=
> 'Select Log_ID, CodeGiven From ClientLog ' +
> ' where Client_ID = ' + IntToStr(aClientId) +
> ' and MachineID = ' + IntToSTr(lMachID) +
> ' and Expires_DateTime = ''' +
> FormatDateTime('dd-mmm-yyyy', aExpireDate) + '''';
>It seems that it has something to do with the particular values I am
>using as I can change them and they work just fine.

Use the format '' or 'mm/dd/yyyy' for your date. They are the
standard date literal formats. The DSQL parser tries to make sense of
non-standard date formats but it can be a bit "hit-or-miss" if you're
relying on a external parser to format the literal.

Also, I'd want to make sure that you have those quotes on the date literal
correct. They should be single quotes ONLY; and separate the quotes
needed for the literal from the quotes Delphi needs for the string, i.e.
try changing

FormatDateTime('dd-mmm-yyyy', aExpireDate) + ''''; (four #39's)


QuotedStr(FormatDateTime('mm/dd/yyyy', aExpireDate))' ;