Posted by: gupta
I am trying to port a small application to use MySQL. It currently support
SQL Server and Access.
The first hurdle I have come across is when using numeric bind variables for
inserts and the 'where' part of select statements when the bind variables
relate to integer-based fields in the database.
For the inserts I get error 1265 (DATA_TRUNCATED) in relation to the integer
For the selects, it seems to treat the bind variable as a decimal number,
but truncates it to a value based on the first digit, so you just get random
I know that I can use the workaround of converting the numberic bind
variables to string equivalents in both cases, and that would work for this
However, we would like to convert our main application with many thousands
of lines of code and this solution would be too time consuming.
I have had an initial attempt at editing the generated dcc.ini file, but
this does not seem to have any effect.
Any ideas would be much appreciated ( I am considering PostgreSQL but dont
want to write off MySQL just yet).
My current versions are:-
MySQL ODBC Driver: 3.51.12
MySQL Database: 5.0.24a
(I have tried version 2.5 of the ODBC driver but it doesn't seem to be
compatible with the server version)
Many thanks in advance