hi, i am using Delphi 7 lite on Windows 7 with MySQL 5.1.41
when i use SQL statement like this DATE_FORMAT(test,"%H:%i:%s") AS test
i get error EConvertError in IDE, in runtime is it OK
i try to debug this strange thing, and i found ZGenericSqlToken.pas
there is a method TZGenericSQLQuoteState.NextToken, which decodes part of SQL which contains two semicolons as a date, but in my case it is "%H:%i:%s" string decoded as a date and the conversion produces this error
can u help me, with this strange behaviour ??
i attach D7 example with sql dump
but enough is open a query whch contains DATE_FORMAT with format string containing 2 semicolons
thx Tomas, Prague
Tokenizer EConvertError - DateTime
Moderators: gto, EgonHugeist, olehs
Tokenizer EConvertError - DateTime
You do not have the required permissions to view the files attached to this post.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
What about changing the tokenizer so that it only interprete strings containing double '/' and/or double ':' as date/time when there are no other characters than numbers and spaces involved? Maybe that won't cover all valid date/time strings? But changing the rule to 'only 0 or 2 numbers allowed between // and ::' would already be a much stronger test than we have now.
Do you feel like making this work?
Please post your changes to TZGenericSQLQuoteState.NextToken here so we can add this to the zeoslib source code.
Mark
Do you feel like making this work?
Please post your changes to TZGenericSQLQuoteState.NextToken here so we can add this to the zeoslib source code.
Mark