Question: When using the TpFIBDataSet, I do not seem to find a way to handle INT64 types. Help please.

Field "PROD_UNIT_PRICE" in Firebird = BigInt     =  2,200,000,000


case pfibqreport.fieldbyname('TBL_Type').AsInteger of
4: mfact:=pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE').AsInteger

my result=
pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE').AsInteger comes through as -2094967296

There is not

How do I pass an Int64 through a TpFIBDataSet?

Method "Fieldbyname" returns abstract class "TField". This class haven't methods for work with Int64 values.

pFIBDataSet has the psUseLargeIntField option in PrepareOptions. If
you include it into your code then FB Bigint field will do mapping
to TFIBLargeIntField. In this case you must write your code as:
4: mfact:=TFIBLargeIntField( pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE')).AsLargeInt

If you don't include psUseLargeIntField then this field will do mapping to TFIBBCDField.

In this case you should write your code as:
4: mfact:=TFIBBCDField( pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE')).AsInt64

And the last recommendation... If you can't know about prepareOptions in your code then you can write it as:
  if pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE') is  TFIBBCDField then
    mfact:=TFIBBCDField( pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE')).AsInt64
  mfact:=TFIBLargeIntField( pFIBDSDetail.fieldbyname('PROD_UNIT_PRICE')).AsLargeInt

Preview text: 
Prices in Euro:

235 (1 copy)
1250 (unlimited)

Volume discounts are available...


Our 911 dispatch center needed a program to monitor the status of equipment used in emergency situations. If one dispatcher modified the status of a piece of equipment, all the other dispatchers needed to see this change immediately. The most elegant way to implement this was by using Firebird Events to asynchronously notify all the users whenever a pertinent change had occurred at the database server. After failing to implement this myself using the Firebird API, I bought a copy of FIBPlus. I dropped a Database, EventAlert and ErrorHandler control into a C++ Builder DataModule and within minutes I had all the functionality I needed. I was able to complete the project quickly and the users are thrilled with the results because I gave them more features than they originally asked for. >>

Darryl Caillouet Programmer City of Little Rock
Download full versions and updates in your Personal Area