Subject | Re: [firebird-support] Firebird / Delphi Type |
---|---|
Author | emel.hu |
Post date | 2004-10-20T22:53Z |
> Yes, but you can use ParamByName('youparam').AsFloatI made it's BCB function for it;)
>
> It'll run fine.
>>
>>I've a field of type NUMERIC(18,0)
>>
>>Which Delphi type can contain this value, without creating someday an
>>overflow (if it ever happens)? Can an Int64 be used? Should I convert
>>it to a string?
>>
>>Does the function Params.ParamValues['myField'] returns a correct value?
Delphi code is similar;))
eMeL
//---------------------------------------------------------------------------
__int64 GetAsInt64 (TField * pField)
{
TLargeintField * pLargeintField = dynamic_cast<TLargeintField *>(pField);
if (pLargeintField)
{
return pLargeintField->Value;
}
else
{
throw Exception("ERROR! A GetAsInt64() parameter is not type
TLargeintField !");
}
}
//---------------------------------------------------------------------------