Page 1 of 1

connection is not defined

Posted: Sun 04 Oct 2009 04:28
by MosCom
hi,
my english is not very good.

There are links between Login.OraQuery with UnitDataModule.OraSession
I can login to the database at designtime
"connection is not defined" at runtime gives error warning

OraQuery.Session:=Datamodule.DBSession;


I hope you can understand my problem.

Delphi 11
Oracle XE
Odac 6.25.0.12

Posted: Mon 05 Oct 2009 07:57
by Plash
Check that your datamodule is created before you create the form with TOraQuery. You can add the datamodule to the list of autocreated forms in the following way:
open Project | Options in the Delphi menu;
select the Forms tab;
move your datamodule to the list of autocreated forms.

Posted: Tue 06 Oct 2009 18:36
by MosCom
In case datamodule already autocreated.

Posted: Mon 12 Oct 2009 08:01
by Plash
Check that the datamodule is created before the form with TOraQuery (Use Project | View Source in the Delphi menu).