Access Violation in BeforeGenerate
I am stumped with a problem involving an Access Violation.
I have a bunch of RAP code in the BeforeGenerate event. I have two
integer fields in the datapipeline, and when I access one of these
fields in an IF statement, it appears to work fine, but if I change the
name of the field to the second field name, I get an access violation.
I have looked hard to make sure I have the right field name, no typos,
etc. I can't figure it out.
Also, if I put the field name that works, when I run it on another
dataset, I get an access violation there.
Is there something in the data that can cause an Access Violation?
What do I look for?
--
I have a bunch of RAP code in the BeforeGenerate event. I have two
integer fields in the datapipeline, and when I access one of these
fields in an IF statement, it appears to work fine, but if I change the
name of the field to the second field name, I get an access violation.
I have looked hard to make sure I have the right field name, no typos,
etc. I can't figure it out.
Also, if I put the field name that works, when I run it on another
dataset, I get an access violation there.
Is there something in the data that can cause an Access Violation?
What do I look for?
--
This discussion has been closed.
Comments
This project is using RB 14.03 Build 63 with Delphi 2007.
The statement is a simple IF statement like the following:
If (Loans['TimesRenewed'] = 0) then ...
When I change 'TimesRenewed' to 'TimesPdDwn' I get the Access Violation.
The TimesRenewed field is mostly null values. The TimesPdDwn has more
values ranging from null and 1 to something like 24.
The problem was in the else statement. The data for the one field
caused it never to execute the else statement whereas the other data
caused it to go to the else statement. In that else statement, I was
referencing a TppVariable and forgot to add the .Value on the end of
the name of that variable. Sorry to waste everyone's time on this. One
of those times when tunnel vision took over and I couldn't see the
forest from the trees.
--