Subject Re: [IBO] Records show at design time but not runtime
Author Lucas Franzen
Mitch,


> procedure TDataModule3.DataModuleCreate(Sender: TObject);
> begin
> if not ib_connection1.Connected then
> ib_connection1.Connect;
> with ib_query1 do
> begin
> if not ib_transaction.started then
> ib_transaction.StartTransaction;
> Open;
> end;
> end;

as others stated it's not a good idea, opening every-/any-thing in the
creation event of the datamodule (remember that there is no application
mainform yet!).
(also please keep in mind that this will not work when delivering this
program version to any other site. If you want to create some kind of
auto-login for this project then think about doinfg this either by
posting events at the approriate time or using a timer that will handle
everything on MainForm.Show; unfortunatley there's no OnAfterShow event ;-))

And you do a ib_connection.Connect then starting a transaction, opening
a query WITHOUT ever testing if the connection is really connected.

If you have to continue with this then try to move your "query open" in
the OnAfterConnect event of the IB_Connection.

Maybe this will help...

Luc.