Subject Re: [IBO] Records show at design time but not runtime
Author mitch_landor
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 12:10 AM 14/03/2006, you wrote:
>
> > >
> > > Could you please view the datamodule in text mode and paste the text
> > > back to the list?
>
> You pasted the unit code. I meant, view the DFM in text mode and
> paste that text back.
>
> Helen
>
> p.s. I'm about to go to bed.
>



object DataModule3: TDataModule3
OldCreateOrder = False
OnCreate = DataModuleCreate
Height = 162
Width = 435
object IB_Connection1: TIB_Connection
LoginPrompt = True
PasswordStorage = psNotSecure
SQLDialect = 3
DatabaseName = 'DB_1'
Params.Strings = (

'PATH=C:\Documents and Settings\mlq\My
Documents\Projects\DecorSp' +
'ec 2006\Program\V001\DB04.FDB'
'USER NAME=SYSDBA')
Left = 40
Top = 24
SavedPassword = '.JuMbLe.01.432B0639073E0E4B49'
end
object IB_Query1: TIB_Query
DatabaseName = 'DB_1'
IB_Connection = IB_Connection1
SQL.Strings = (
'SELECT *'
'FROM TEST_TABLE')
KeyLinks.Strings = (
'ID')
Left = 120
Top = 24
end
object IB_DataSource1: TIB_DataSource
Dataset = IB_Query1
Left = 208
Top = 24
end
end

====================

Here is all the other code:

program TestProj2;

uses
Forms,
MainForm in 'MainForm.pas' {Form2},
dm02 in 'dm02.pas' {DataModule3: TDataModule};

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TDataModule3, DataModule3);
Application.CreateForm(TForm2, Form2);
Application.Run;
end.

=======================================

unit MainForm;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Forms,
Dialogs, IB_UpdateBar, IB_NavigationBar, ExtCtrls, IB_SearchBar, Grids,
IB_Grid;

type
TForm2 = class(TForm)
IB_Grid1: TIB_Grid;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form2: TForm2;

implementation

uses dm02;

{$R *.dfm}



end.

===============================

unit dm02;

interface

uses
SysUtils, Classes, IB_Components;

type
TDataModule3 = class(TDataModule)
IB_Connection1: TIB_Connection;
IB_Query1: TIB_Query;
IB_DataSource1: TIB_DataSource;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
DataModule3: TDataModule3;

implementation

{$R *.dfm}

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;

end.


============================

PS: I'm also about to go to bed.

Many thanks

Mitch