Hi
Could you just use the code
AcustomTable['Ref'] := 111;
I think that this uses variants and I would not have a clue if this
would handle large integers correctly but it would be worth a try.
It would be easy to do a search and replace to
replace .FieldByName( with [
and replace ).AsInteger with ]
 
nb
The only downside I have found using this method to access
fields is that s:=Table['CustName'] will return an error if the
CustName field is NULL as this is a valid variant value.
ie need to do
if Table['CustName']<>NULL then
  s:=Table['CustName']
else
  s:='';
where s is s String
s:=Table.FieldByName('CustName').AsString
just returns a blank string.
 
Warren
-----Original Message-----
From: Robert martin [mailto:[EMAIL PROTECTED]
Sent: Monday, 26 April 2004 03:27 p.m.
To: [EMAIL PROTECTED] org. nz
Subject: [DUG] Large integers again

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
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to