?
Solved

Why Am I getting this on ISQL Query - Overflow occurred during data type conversion. conversion error from string '05-21-2000'

Posted on 2009-02-20
2
Medium Priority
?
989 Views
Last Modified: 2013-12-09
Here is what my code-snip looks like in Delphi 7 below

Then during debug or runtime I got this error detail - >

Overflow occurred during data type conversion. conversion error from string '05-21-2000'

I do get same sql complaints on both Delphi runtime and in IB Expert.

This should be valid isql syntax.  Can someone help me please.

Thanks in advance.
with TQuery do begin
      Close;
      SQL.Clear;
      mysql := 'SELECT * FROM BATCH_RUN WHERE Add_date = ';
      mysql := mysql + ''''+ FormatDateTime( 'mm/dd/yyyy', 36665 ) + '''';
      mysql := mysql + ' AND rec_proc = ' + IntToStr( irecs );
      mysql := mysql + ' order by batch_id asc ';
      SQL.Add( mysql );
      Open;
      First;
end;

Open in new window

0
Comment
Question by:lancerxe
  • 2
2 Comments
 

Author Comment

by:lancerxe
ID: 23693304
The sent query string would look like this on server ->
SELECT * FROM BATCH_RUN WHERE Add_date = '05-21-2000' AND rec_proc = 53 order by batch_id asc

Open in new window

0
 

Accepted Solution

by:
lancerxe earned 0 total points
ID: 23693523
Nevermind Experts - I solved my own problem on my own.

Thank you for your time.
SELECT * FROM
BATCH_RUN 
WHERE Add_date = CAST('05-21-2000' AS Date) 
AND rec_proc = 53 
order by batch_id asc

Open in new window

0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, we’ll look at how to deploy ProxySQL.
What we learned in Webroot's webinar on multi-vector protection.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question