 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Douglas Guest
|
Posted: Tue Dec 23, 2003 2:06 pm Post subject: DB2 -- datetime value is out of range |
|
|
A client is getting the following error from the database while filling the
params. of a prepared query...
SQL0181N The string representation of a datetime value is out of range.
SQLSTATE=22007
We support just about all DB platforms and will be going to ADO very soon.
In the meantime, we are going through the BDE and below is how I am doing
this. Any suggestions?
In an earlier function, ProcDate = Date (today's date without the timestamp)
This works on our DB2, but does not work on the client's version of DB2...
MyQuery.ParamByName('PROCESSDATE').AsDateTime := ProcDate;
This works on ours and on the client's version of DB2, but may not work on
all of the other platforms...
MyQuery.ParamByName('PROCESSDATE').AsDate := ProcDate;
Thanks,
Samson
|
|
| Back to top |
|
 |
Tony J Hopkinson Guest
|
Posted: Thu Dec 25, 2003 12:19 am Post subject: Re: DB2 -- datetime value is out of range |
|
|
On Tue, 23 Dec 2003 09:06:55 -0500, "Douglas" <SSA (AT) LV (DOT) com> wrote:
| Quote: | A client is getting the following error from the database while filling the
params. of a prepared query...
SQL0181N The string representation of a datetime value is out of range.
SQLSTATE=22007
We support just about all DB platforms and will be going to ADO very soon.
In the meantime, we are going through the BDE and below is how I am doing
this. Any suggestions?
In an earlier function, ProcDate = Date (today's date without the timestamp)
This works on our DB2, but does not work on the client's version of DB2...
MyQuery.ParamByName('PROCESSDATE').AsDateTime := ProcDate;
This works on ours and on the client's version of DB2, but may not work on
all of the other platforms...
MyQuery.ParamByName('PROCESSDATE').AsDate := ProcDate;
Thanks,
Samson
|
Depends on the client's date time format in windows. Look at their
regional setup.
Always much better to user FornatDateTime and put your date/ times in
as string in the format the database server understands.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|