Persistent fields automatically support aslargeint
We have a function AsInt64 (AField : TFIeld) : int64 which uses asstring insided followed by strtoint. So code looks like
B := AsInt64(Table.FieldByName('Ref'));Assigning
Table.FieldByName ('Ref').AsString := IntToStr (B);
Robert martin wrote:
Hi All
We want to access Int64 fields in a DB. We have code like
AcustomTable.FieldByName('Ref').AsInteger := 111;
We can access Int64s by changing it to
(AcustomTable.FieldByName('Ref') as TLargeintField).AsLargeInt := 111;
I would love not to have to change all our code to the above. What I would like to do is override the asInteger stuff in a custom table component and have it check to see if the integer is a large int and handle it as above. Does this sound feasible ? Are there better options?
Rob Martin
Software Engineer
phone 03 377 0495
fax 03 377 0496 web www.chreos.com <http://www.chreos.com>
------------------------------------------------------------------------
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________ Delphi mailing list [EMAIL PROTECTED] http://ns3.123.co.nz/mailman/listinfo/delphi
