Subject Access Violation
Author mitch_landor
I'm using TIBO objects and a TdbGrid. I had this running OK before,
now I keep getting this message:

"First chance exception at $7C81EB33. Exception class EAccessViolation
with message 'Access violation at address 00520870 in module
'TestProj02.exe'. Read of address 00000058'. Process TestProj02.exe
(3212)"

After I "continue" in the debugger, the form runs OK and I can edit
the data.

Any idea why this might be?

Many Thanks
Mitch


Here is the datamodule:
=======================
unit flnmDataModule;

interface

uses
SysUtils, Classes, DB, IBODataset, IB_Components;

type
TDataModuleTest = class(TDataModule)
IBODatabase1: TIBODatabase;
IBOQuery1: TIBOQuery;
DataSource1: TDataSource;
private
{ Private declarations }
public
{ Public declarations }
end;

var
DataModuleTest: TDataModuleTest;

implementation

{$R *.dfm}

end.



Here is the form:
=================
unit Main;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids;

type
TForm2 = class(TForm)
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form2: TForm2;

implementation

uses flnmDataModule;

{$R *.dfm}

procedure TForm2.FormCreate(Sender: TObject);
begin
with DataModuleTest do

begin
if not IBODatabase1.Connected then
IBODatabase1.Connect;

if not IBOQuery1.Active then
begin
IBOQuery1.Prepare;
IBOQuery1.Open
end;
end;
end;

end.