Maybe it has something to do with the way it was calculating
"Field[Ord(bkBankNo) + 1]"

What happens if you try :

Field[(Ord(bkBankNo) + 1)]


Otherwise, I got nuttin....


----- Original Message -----
From: Matt Dee <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, January 09, 2003 5:41 PM
Subject: [DUG]: Porting to Delphi 6


> I'm in the middle of porting our main app to Delphi 6 and I came across
this probem.
>
> in Delphi 4, the following ran ok:
>
> if dbgrdBankAccounts.Field[Ord(bkBankNo) + 1].AsString =
Company.sDefaultBankAccount then
>
>
>
> Under Delphi 6 I get an access violation.  However, if I break it down
into its component
> pieces, everything runs as it used to:
>
>   intBankNo := Ord(bkBankNo) + 1;
>   strBankAcc := dbgrdBankAccounts.Field[intBankNo].AsString;
>   if strBankAcc = Company.sDefaultBankAccount then //we're ok......
>
>
> Any ideas why this would happen?  It's not a huge issue, but it does
indicate a possible
> problem with the compiler unless I'm missing something obvious here.
>
> (This isn't my code BTW, I'm maintaining it *cries*)
>
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to