 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Mon Oct 09, 2006 2:44 am Post subject: AsInt64 Gives "Undeclared Identifier" |
|
|
Field 'Chq_No' in Cheques.dbf needs to be 10 digits long.
Payments made by cash are identified by cheque No. '9999999999'.
Searching for this number, using
"dbCheques.FieldByName('Chq_No').AsInteger" gives weird results due to
that number being larger than the maximum value.
Searching using "dbCheques.FieldByName('Chq_No').AsInt64" returns
message
" [Error] TryU.pas(159): Undeclared identifier: 'AsInt64' ".
Why is this so ? How can I access this number ?
TIA
Les Redding
ellenjay@hotkeyDOTnetDOTAu |
|
| Back to top |
|
 |
Jamie Guest
|
Posted: Tue Oct 10, 2006 1:36 am Post subject: Re: AsInt64 Gives "Undeclared Identifier" |
|
|
ellenjay1 (AT) hotmail (DOT) com wrote:
| Quote: | Field 'Chq_No' in Cheques.dbf needs to be 10 digits long.
Payments made by cash are identified by cheque No. '9999999999'.
Searching for this number, using
"dbCheques.FieldByName('Chq_No').AsInteger" gives weird results due to
that number being larger than the maximum value.
Searching using "dbCheques.FieldByName('Chq_No').AsInt64" returns
message
" [Error] TryU.pas(159): Undeclared identifier: 'AsInt64' ".
Why is this so ? How can I access this number ?
TIA
Les Redding
ellenjay@hotkeyDOTnetDOTAu
use currency or a double and ignore the fraction. |
or format it as a string and simply use conversions
on the fly..
for example.
MyCheckNumberfromDb := Trunc(StrToFloat(FieldByName('Chq_No').AsString));
ect...
when dealing with large numbers that only have to be
used for look ups and not heavy calculations, a string match
usually is the best for performance searchs.
--
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5 |
|
| Back to top |
|
 |
Thomas W. Clay Guest
|
Posted: Tue Oct 10, 2006 8:27 am Post subject: Re: AsInt64 Gives "Undeclared Identifier" |
|
|
Typecast to TLargeIntField
Or, if you have the latest version, create a TField helper function: AsInt64
(or whatever you wish to name it).
Tom
<ellenjay1 (AT) hotmail (DOT) com> wrote in message
news:1160343843.260837.298020 (AT) h48g2000cwc (DOT) googlegroups.com...
| Quote: | Field 'Chq_No' in Cheques.dbf needs to be 10 digits long.
Payments made by cash are identified by cheque No. '9999999999'.
Searching for this number, using
"dbCheques.FieldByName('Chq_No').AsInteger" gives weird results due to
that number being larger than the maximum value.
Searching using "dbCheques.FieldByName('Chq_No').AsInt64" returns
message
" [Error] TryU.pas(159): Undeclared identifier: 'AsInt64' ".
Why is this so ? How can I access this number ?
TIA
Les Redding
ellenjay@hotkeyDOTnetDOTAu
|
|
|
| Back to top |
|
 |
Dan Guest
|
Posted: Wed Nov 08, 2006 9:40 am Post subject: Re: AsInt64 Gives "Undeclared Identifier" |
|
|
On 8 Oct 2006 14:44:03 -0700, ellenjay1 (AT) hotmail (DOT) com wrote:
| Quote: | Field 'Chq_No' in Cheques.dbf needs to be 10 digits long.
Payments made by cash are identified by cheque No. '9999999999'.
|
Can you just add a column to designate cash or cheque? One byte will
do it. Or use a negative value, eg, -1; or just 0 since no one uses
zero for a cheque number.?
| Quote: | Searching for this number, using
"dbCheques.FieldByName('Chq_No').AsInteger" gives weird results due to
that number being larger than the maximum value.
Searching using "dbCheques.FieldByName('Chq_No').AsInt64" returns
message
" [Error] TryU.pas(159): Undeclared identifier: 'AsInt64' ".
|
Is this a compiler message or runtime message?
hth, Dan
| Quote: |
Why is this so ? How can I access this number ?
TIA
Les Redding
ellenjay@hotkeyDOTnetDOTAu |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|