Page 1 of 1

How to convert BIGINT to INTEGER ?

Posted: Fri 01 Feb 2008 08:48
by swierzbicki
Hi,

I'm some problems (I guess it is MySQL related) :
Case
When Table1.Field1 is null the Table2.Field1 else Table1.Field1
End As Field1
Table2 is an alias of Table1 (left outer join table1 as tables2....)
field1 is an Integer

The case statement is returning a LargeInteger.

Is it possible to convert this LargeInteger into an integer (so that delphi will not raised an exception when the data type will not match the one stored in the persistent field)

Posted: Wed 06 Feb 2008 15:21
by Dimon
MySQL server returns for this query a field of the LargeInt type.
Now MyDAC does not provide means to convert LargeInt fileds to Integer fields, but we will support such functionality in the next MyDAC build.

Posted: Thu 07 Feb 2008 09:33
by swierzbicki
Hi Dimon,

Thank you for the answer.