PaidtheUmpire
Programmer
Using DELPHI 7 which uses ADO to access a Microsoft Access Database...
I have a program which calls the following function, when created:
Which calls the StatPageOne function...
I keep getting the following error:
"Project ***.exe raised an exception class EAccessViolation ..... ....."
Any help would be very very helpful
Delphi, Delphi, Delphi. Oi! Oi! Oi!
I have a program which calls the following function, when created:
Code:
procedure TForm1.FormCreate(Sender: TObject);
begin
PageControl1.ActivePageIndex := 0;
StatPageOne;
end;
Which calls the StatPageOne function...
Code:
procedure TForm1.StatPageOne;
label StatFour, StatSeven;
var RowNo, Games, Value : integer;
begin
GridStat1.ColWidths[2] := 80;
GridStat1.Cells[1,0] := 'Pins';
GridStat1.Cells[2,0] := 'Average';
RowNo := 1;
DataFolder.Stat1.Active := True; <------------------- //HIGHLIGHTS THIS LINE
if DataFolder.Stat1.RecordCount > 0 then
while not DataFolder.Stat1.EOF do
begin
GridStat1.Cells[ 0,RowNo] := DataFolder.Stat1.Fields[ 0].AsString;
GridStat1.Cells[ 1,RowNo] := DataFolder.Stat1.Fields[ 1].AsString;
GridStat1.Cells[ 2,RowNo] := DataFolder.Stat1.Fields[ 2].AsString;
DataFolder.Stat1.Next;
Inc(RowNo);
end;
GridStat2.ColWidths[1] := 110;
GridStat2.Cells[1,0] := 'Game High';
RowNo := 1;
// etc. etc.
I keep getting the following error:
"Project ***.exe raised an exception class EAccessViolation ..... ....."
Any help would be very very helpful
Delphi, Delphi, Delphi. Oi! Oi! Oi!