BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AsInt64 Gives "Undeclared Identifier"

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Mon Oct 09, 2006 2:44 am    Post subject: AsInt64 Gives "Undeclared Identifier" Reply with 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
Jamie
Guest





PostPosted: Tue Oct 10, 2006 1:36 am    Post subject: Re: AsInt64 Gives "Undeclared Identifier" Reply with quote



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





PostPosted: Tue Oct 10, 2006 8:27 am    Post subject: Re: AsInt64 Gives "Undeclared Identifier" Reply with quote



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





PostPosted: Wed Nov 08, 2006 9:40 am    Post subject: Re: AsInt64 Gives "Undeclared Identifier" Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.databases All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.