Subject | a mistake when linking 2 ibdatasets |
---|---|
Author | osendej |
Post date | 2002-02-18T18:45:14Z |
Hello, everybody !
Could someone help me with a mistake that I made somewhere I can't
figure out where,
when linking 2 ibdatasets in a master-detail relation.
I beg your pardon for a somewhat lengthy example.
Here it is :
create table tmag
(
magid integer not null,
magcode varchar( 10 ) not null,
maglib varchar( 20 ) not null,
constraint pk_tmag_maid primary key ( magid )
) ;
commit ;
create table tmvt
(
mvtid integer not null,
magid integer not null,
mvtdate date,
constraint pk_tmvt_mvtid primary key ( mvtid ),
constraint fk_tmvt_magid foreign key( magid )
) ;
commit ;
In Delphi, I've TIBDatabase, TIbTransaction, 2 Tibdatasets ( tmag,
tmvt), 2 Tdatasources.(stmag, stmvt)
The Sql Select String for the TIBDataset component that points to
tmag table is as follows :
select magid, magcode, maglib from tmag
The Sql Select string for the TIBdataset that points to the tmvt
table is as follows
select mvtid, magid, mvtdate from tmvt where magid = :magid
The second TIBdataset has datasource property set to stmag
I've also created 2 grids, 1 for each TIBdataset, and some tdbedit
objects for the second
TIBdataset (tmvt).
When I use a navigator to move from one record to another in the tmag
TIBdataset, then
the record pointer moves normally in the dependent detail grid
(tmvt), but TBEdit objects
linked to the tmvt TIBDataset aren't refreshed
With respect,
JosephHello, everybody !
Could someone help me with a mistake that I made somewhere I can't
figure out where,
when linking 2 ibdatasets in a master-detail relation.
I beg your pardon for a somewhat lengthy example.
Here it is :
create table tmag
(
magid integer not null,
magcode varchar( 10 ) not null,
maglib varchar( 20 ) not null,
constraint pk_tmag_maid primary key ( magid )
) ;
commit ;
create table tmvt
(
mvtid integer not null,
magid integer not null,
mvtdate date,
constraint pk_tmvt_mvtid primary key ( mvtid ),
constraint fk_tmvt_magid foreign key( magid )
) ;
commit ;
In Delphi, I've TIBDatabase, TIbTransaction, 2 Tibdatasets ( tmag,
tmvt), 2 Tdatasources.(stmag, stmvt)
The Sql Select String for the TIBDataset component that points to
tmag table is as follows :
select magid, magcode, maglib from tmag
The Sql Select string for the TIBdataset that points to the tmvt
table is as follows
select mvtid, magid, mvtdate from tmvt where magid = :magid
The second TIBdataset has datasource property set to stmag
I've also created 2 grids, 1 for each TIBdataset, and some tdbedit
objects for the second
TIBdataset (tmvt).
When I use a navigator to move from one record to another in the tmag
TIBdataset, then
the record pointer moves normally in the dependent detail grid
(tmvt), but TBEdit objects
linked to the tmvt TIBDataset aren't refreshed
With respect,
Joseph
Could someone help me with a mistake that I made somewhere I can't
figure out where,
when linking 2 ibdatasets in a master-detail relation.
I beg your pardon for a somewhat lengthy example.
Here it is :
create table tmag
(
magid integer not null,
magcode varchar( 10 ) not null,
maglib varchar( 20 ) not null,
constraint pk_tmag_maid primary key ( magid )
) ;
commit ;
create table tmvt
(
mvtid integer not null,
magid integer not null,
mvtdate date,
constraint pk_tmvt_mvtid primary key ( mvtid ),
constraint fk_tmvt_magid foreign key( magid )
) ;
commit ;
In Delphi, I've TIBDatabase, TIbTransaction, 2 Tibdatasets ( tmag,
tmvt), 2 Tdatasources.(stmag, stmvt)
The Sql Select String for the TIBDataset component that points to
tmag table is as follows :
select magid, magcode, maglib from tmag
The Sql Select string for the TIBdataset that points to the tmvt
table is as follows
select mvtid, magid, mvtdate from tmvt where magid = :magid
The second TIBdataset has datasource property set to stmag
I've also created 2 grids, 1 for each TIBdataset, and some tdbedit
objects for the second
TIBdataset (tmvt).
When I use a navigator to move from one record to another in the tmag
TIBdataset, then
the record pointer moves normally in the dependent detail grid
(tmvt), but TBEdit objects
linked to the tmvt TIBDataset aren't refreshed
With respect,
JosephHello, everybody !
Could someone help me with a mistake that I made somewhere I can't
figure out where,
when linking 2 ibdatasets in a master-detail relation.
I beg your pardon for a somewhat lengthy example.
Here it is :
create table tmag
(
magid integer not null,
magcode varchar( 10 ) not null,
maglib varchar( 20 ) not null,
constraint pk_tmag_maid primary key ( magid )
) ;
commit ;
create table tmvt
(
mvtid integer not null,
magid integer not null,
mvtdate date,
constraint pk_tmvt_mvtid primary key ( mvtid ),
constraint fk_tmvt_magid foreign key( magid )
) ;
commit ;
In Delphi, I've TIBDatabase, TIbTransaction, 2 Tibdatasets ( tmag,
tmvt), 2 Tdatasources.(stmag, stmvt)
The Sql Select String for the TIBDataset component that points to
tmag table is as follows :
select magid, magcode, maglib from tmag
The Sql Select string for the TIBdataset that points to the tmvt
table is as follows
select mvtid, magid, mvtdate from tmvt where magid = :magid
The second TIBdataset has datasource property set to stmag
I've also created 2 grids, 1 for each TIBdataset, and some tdbedit
objects for the second
TIBdataset (tmvt).
When I use a navigator to move from one record to another in the tmag
TIBdataset, then
the record pointer moves normally in the dependent detail grid
(tmvt), but TBEdit objects
linked to the tmvt TIBDataset aren't refreshed
With respect,
Joseph