Hi!
If I want to get an integer from a row in a table I do this:
MyQuery->FieldByName("ResultId")->AsInteger
But there is not a function like this:
MyQuery->FieldByName("ResultId")->AsInt64
How do I get a BIGINT value from MySQL database?
Regard Thomas
AsInt64 is not available
If the ResultId field is represented as TLargeintField on the client, you can cast it explicitly to TLargeintField and call the AsLargeInt method.
In Delphi this may look like the following:
In Delphi this may look like the following:
Code: Select all
if MyQuery1.FieldByName('c_int64') is TLargeintField then
ShowMessage(IntToStr(TLargeintField(MyQuery1.FieldByName('c_int64')).AsLargeInt));In Borland C++ Builder it would look like this
In Borland C++ Builder it would look like this:
unsigned __int64 val;
val = ((TLargeintField*)MyQuery->FieldByName("c_int64"))->AsLargeInt;
unsigned __int64 val;
val = ((TLargeintField*)MyQuery->FieldByName("c_int64"))->AsLargeInt;