Subject | Re: [IBO] Exception 335544334: conversion error from string "ABCDEFAA" |
---|---|
Author | Aage Johansen |
Post date | 2004-06-23T19:36:06Z |
Ed Dressel wrote:
Select Log_ID, CODEGIVEN
From ClientLog
where Client_ID = :ClientID
and MachineID = :MachineID
and Expires_DateTime = :ExpireDate
Doing e.g.
lIBQ.ParamByName('ExpireDate').AsDateTime:=aExpireDate:
will save you any conversion hassels.
--
Aage J.
> ... Here's my Delphi code that creates the SQL:In any case, why not use parameters?
>
> 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.
Select Log_ID, CODEGIVEN
From ClientLog
where Client_ID = :ClientID
and MachineID = :MachineID
and Expires_DateTime = :ExpireDate
Doing e.g.
lIBQ.ParamByName('ExpireDate').AsDateTime:=aExpireDate:
will save you any conversion hassels.
--
Aage J.