MySQL Bind Variables

forum.connectivity (1998-2005) & forum.td.connectivity (2005-2010)
gupta

MySQL Bind Variables

Post by gupta » 25 Sep 2006, 17:26

 Posted by:  gupta 

Hi

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
field.
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
results.

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
small application.
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:-

TD: 2.1PTF4
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

Mark

eze

MySQL Bind Variables

Post by eze » 15 Aug 2008, 22:18

 Posted by:  eze 

Check this http://markmail.org/message/hqn4dvev725gyjc3

Return to “td.connectivity”

Who is online

Users browsing this forum: [Ccbot] and 0 guests