Subject | record insertion into a detail table using update bar fails |
---|---|
Author | de_pablito |
Post date | 2008-05-20T05:56:20Z |
Hi,
I'm not very experienced with IBO. I can't figure out why when I click
on the update bar attached to my detail table a new row isn't inserted
into the detail table. The master-detail relationship is working in
the sense that changing the master record causes an update to the
detail grid.
I'm using BCB6 and am having trouble debugging as the symbols for
IB_components.pas are messed up past a certain part in the file, but I
was able to discover that a breakpoint set for IB_Grid.InvalidateRow
is hit, and then I can see the call stack. I compared that call stack
to the same process in the example program MasterLinks (where a row is
inserted) and it seems the difference is in what code is attached to
the events of TIB_Datalink.DoDataChange.
I think I've verified that the row is added to the dataset and the
foreign key's value is being set as well.
Here's the call stack for my program (reversed to make it easy to
compare with the example program):
00625359 Ib_updatebar::TIB_UpdateBar::BarClick(Self=:01298638,
Sender=:01298FDC)
0062527F Ib_updatebar::TIB_UpdateBar::BtnClick(Self=:01298638, Index=1
/* ubInsert */)
00474E16 Ib_components::TIB_Dataset::Insert(Self=:01237294)
004763A0 Ib_components::TIB_Dataset::SysInsert(Self=:01237294)
00493E2E Ib_components::TIB_Row::EndUpdate(Self=:0123ADD4,
SingleEventOnly=true)
00493E8A Ib_components::TIB_Row::SysApplyUpdates(Self=:0123ADD4,
SingleEventOnly=true)
00493DE2 Ib_components::TIB_Row::DoAfterModify(Self=:0123ADD4,
IB_Field=NULL)
0047C969
Ib_components::TIB_BDataset::SysAfterFieldDataChange(Self=:01237294,
Sender=:0123ADD4, AField=NULL)
00466E54
Ib_components::TIB_Statement::SysAfterFieldDataChange(Self=:01237294,
Sender=:0123ADD4, AField=NULL)
00478C01 Ib_components::TIB_Dataset::ProcessLinkEvent(Self=:01237294,
AEvent=22 /* setFieldsDataChange */, Info=0)
00469409
Ib_components::TIB_Statement::ProcessLinkEvent(Self=:01237294,
AEvent=22 /* setFieldsDataChange */, Info=0)
0048C068 Ib_components::TIB_DataSource::ProcessEvent(Self=:0123C930,
AEvent=22 /* setFieldsDataChange */, Info=0)
0048E802
Ib_components::TIB_DataLink::ProcessStatementEvent(Self=:0128ACD4,
AEvent=22 /* setFieldsDataChange */, Info=0)
005F7113
Ib_fielddatalink::TIB_ControlDataLink::SysDataChange(Self=:0128ACD4,
AField=NULL)
0048DDC5 Ib_components::TIB_DataLink::SysDataChange(Self=:0128ACD4,
AField=NULL)
0048DF7A Ib_components::TIB_DataLink::DoDataChange(Self=:0128ACD4,
AField=NULL)
005FEFA1 Ib_grid::TIB_CustomGrid::DataChange(Self=:0128A838,
Sender=:0128ACD4, IB_DataSource=:0123C930, IB_Field=NULL)
00600802 Ib_grid::TIB_CustomGrid::SysDataChange(Self=:0128A838,
IB_Field=NULL)
0060B0E0 Ib_grid::TIB_CustomGrid::InvalidateRow(Self=:0128A838,
ARow=1, IsCurrRow=false)
Call stack for masterlinks:
004F391D Ib_updatebar::TIB_UpdateBar::BarClick(Self=:011931B8,
Sender=:01193A60)
004F3843 Ib_updatebar::TIB_UpdateBar::BtnClick(Self=:011931B8, Index=1
/* ubInsert */)
00439546 Ib_components::TIB_Dataset::Insert(Self=:0119BFF0)
0043AAD0 Ib_components::TIB_Dataset::SysInsert(Self=:0119BFF0)
0045855E Ib_components::TIB_Row::EndUpdate(Self=:0119FE58,
SingleEventOnly=true)
004585BA Ib_components::TIB_Row::SysApplyUpdates(Self=:0119FE58,
SingleEventOnly=true)
00458512 Ib_components::TIB_Row::DoAfterModify(Self=:0119FE58,
IB_Field=NULL)
00441099
Ib_components::TIB_BDataset::SysAfterFieldDataChange(Self=:0119BFF0,
Sender=:0119FE58, AField=NULL)
0042B584
Ib_components::TIB_Statement::SysAfterFieldDataChange(Self=:0119BFF0,
Sender=:0119FE58, AField=NULL)
0043D331 Ib_components::TIB_Dataset::ProcessLinkEvent(Self=:0119BFF0,
AEvent=22 /* setFieldsDataChange */, Info=0)
0042DB39
Ib_components::TIB_Statement::ProcessLinkEvent(Self=:0119BFF0,
AEvent=22 /* setFieldsDataChange */, Info=0)
00450798 Ib_components::TIB_DataSource::ProcessEvent(Self=:011A0D44,
AEvent=22 /* setFieldsDataChange */, Info=0)
00452F32
Ib_components::TIB_DataLink::ProcessStatementEvent(Self=:011A34A4,
AEvent=22 /* setFieldsDataChange */, Info=0)
004524F5 Ib_components::TIB_DataLink::SysDataChange(Self=:011A34A4,
AField=NULL)
004526AA Ib_components::TIB_DataLink::DoDataChange(Self=:011A34A4,
AField=NULL)
004307B2
Ib_components::TIB_Dataset::IB_MasterDataChange(Self=:011A22C4,
ADataLink=:011A34A4, ADataSource=:011A0D44, AField=NULL)
00430E17
Ib_components::TIB_Dataset::SysMasterDataChange(Self=:011A22C4,
AField=NULL)
00430CCC SysMDChange(AField=NULL)
0045855E Ib_components::TIB_Row::EndUpdate(Self=:011A2AD8,
SingleEventOnly=true)
004585F4 Ib_components::TIB_Row::SysApplyUpdates(Self=:011A2AD8,
SingleEventOnly=true)
00458512 Ib_components::TIB_Row::DoAfterModify(Self=:011A2AD8,
IB_Field=:011BB770)
0043069C
Ib_components::TIB_Dataset::SysAfterParamsDataChange(Self=:011A22C4,
Sender=:011A2AD8, AField=:011BB770)
0043422B Ib_components::TIB_Dataset::RefreshKeys(Self=:011A22C4)
00434ED8 Ib_components::TIB_Dataset::SysRefresh(Self=:011A22C4,
Rows=false, Keys=true)
0043D15C Ib_components::TIB_Dataset::EnableControls(Self=:011A22C4)
0043D331 Ib_components::TIB_Dataset::ProcessLinkEvent(Self=:011A22C4,
AEvent=22 /* setFieldsDataChange */, Info=0)
0042DB39
Ib_components::TIB_Statement::ProcessLinkEvent(Self=:011A22C4,
AEvent=22 /* setFieldsDataChange */, Info=0)
Any help appreciated.
Pablito
I'm not very experienced with IBO. I can't figure out why when I click
on the update bar attached to my detail table a new row isn't inserted
into the detail table. The master-detail relationship is working in
the sense that changing the master record causes an update to the
detail grid.
I'm using BCB6 and am having trouble debugging as the symbols for
IB_components.pas are messed up past a certain part in the file, but I
was able to discover that a breakpoint set for IB_Grid.InvalidateRow
is hit, and then I can see the call stack. I compared that call stack
to the same process in the example program MasterLinks (where a row is
inserted) and it seems the difference is in what code is attached to
the events of TIB_Datalink.DoDataChange.
I think I've verified that the row is added to the dataset and the
foreign key's value is being set as well.
Here's the call stack for my program (reversed to make it easy to
compare with the example program):
00625359 Ib_updatebar::TIB_UpdateBar::BarClick(Self=:01298638,
Sender=:01298FDC)
0062527F Ib_updatebar::TIB_UpdateBar::BtnClick(Self=:01298638, Index=1
/* ubInsert */)
00474E16 Ib_components::TIB_Dataset::Insert(Self=:01237294)
004763A0 Ib_components::TIB_Dataset::SysInsert(Self=:01237294)
00493E2E Ib_components::TIB_Row::EndUpdate(Self=:0123ADD4,
SingleEventOnly=true)
00493E8A Ib_components::TIB_Row::SysApplyUpdates(Self=:0123ADD4,
SingleEventOnly=true)
00493DE2 Ib_components::TIB_Row::DoAfterModify(Self=:0123ADD4,
IB_Field=NULL)
0047C969
Ib_components::TIB_BDataset::SysAfterFieldDataChange(Self=:01237294,
Sender=:0123ADD4, AField=NULL)
00466E54
Ib_components::TIB_Statement::SysAfterFieldDataChange(Self=:01237294,
Sender=:0123ADD4, AField=NULL)
00478C01 Ib_components::TIB_Dataset::ProcessLinkEvent(Self=:01237294,
AEvent=22 /* setFieldsDataChange */, Info=0)
00469409
Ib_components::TIB_Statement::ProcessLinkEvent(Self=:01237294,
AEvent=22 /* setFieldsDataChange */, Info=0)
0048C068 Ib_components::TIB_DataSource::ProcessEvent(Self=:0123C930,
AEvent=22 /* setFieldsDataChange */, Info=0)
0048E802
Ib_components::TIB_DataLink::ProcessStatementEvent(Self=:0128ACD4,
AEvent=22 /* setFieldsDataChange */, Info=0)
005F7113
Ib_fielddatalink::TIB_ControlDataLink::SysDataChange(Self=:0128ACD4,
AField=NULL)
0048DDC5 Ib_components::TIB_DataLink::SysDataChange(Self=:0128ACD4,
AField=NULL)
0048DF7A Ib_components::TIB_DataLink::DoDataChange(Self=:0128ACD4,
AField=NULL)
005FEFA1 Ib_grid::TIB_CustomGrid::DataChange(Self=:0128A838,
Sender=:0128ACD4, IB_DataSource=:0123C930, IB_Field=NULL)
00600802 Ib_grid::TIB_CustomGrid::SysDataChange(Self=:0128A838,
IB_Field=NULL)
0060B0E0 Ib_grid::TIB_CustomGrid::InvalidateRow(Self=:0128A838,
ARow=1, IsCurrRow=false)
Call stack for masterlinks:
004F391D Ib_updatebar::TIB_UpdateBar::BarClick(Self=:011931B8,
Sender=:01193A60)
004F3843 Ib_updatebar::TIB_UpdateBar::BtnClick(Self=:011931B8, Index=1
/* ubInsert */)
00439546 Ib_components::TIB_Dataset::Insert(Self=:0119BFF0)
0043AAD0 Ib_components::TIB_Dataset::SysInsert(Self=:0119BFF0)
0045855E Ib_components::TIB_Row::EndUpdate(Self=:0119FE58,
SingleEventOnly=true)
004585BA Ib_components::TIB_Row::SysApplyUpdates(Self=:0119FE58,
SingleEventOnly=true)
00458512 Ib_components::TIB_Row::DoAfterModify(Self=:0119FE58,
IB_Field=NULL)
00441099
Ib_components::TIB_BDataset::SysAfterFieldDataChange(Self=:0119BFF0,
Sender=:0119FE58, AField=NULL)
0042B584
Ib_components::TIB_Statement::SysAfterFieldDataChange(Self=:0119BFF0,
Sender=:0119FE58, AField=NULL)
0043D331 Ib_components::TIB_Dataset::ProcessLinkEvent(Self=:0119BFF0,
AEvent=22 /* setFieldsDataChange */, Info=0)
0042DB39
Ib_components::TIB_Statement::ProcessLinkEvent(Self=:0119BFF0,
AEvent=22 /* setFieldsDataChange */, Info=0)
00450798 Ib_components::TIB_DataSource::ProcessEvent(Self=:011A0D44,
AEvent=22 /* setFieldsDataChange */, Info=0)
00452F32
Ib_components::TIB_DataLink::ProcessStatementEvent(Self=:011A34A4,
AEvent=22 /* setFieldsDataChange */, Info=0)
004524F5 Ib_components::TIB_DataLink::SysDataChange(Self=:011A34A4,
AField=NULL)
004526AA Ib_components::TIB_DataLink::DoDataChange(Self=:011A34A4,
AField=NULL)
004307B2
Ib_components::TIB_Dataset::IB_MasterDataChange(Self=:011A22C4,
ADataLink=:011A34A4, ADataSource=:011A0D44, AField=NULL)
00430E17
Ib_components::TIB_Dataset::SysMasterDataChange(Self=:011A22C4,
AField=NULL)
00430CCC SysMDChange(AField=NULL)
0045855E Ib_components::TIB_Row::EndUpdate(Self=:011A2AD8,
SingleEventOnly=true)
004585F4 Ib_components::TIB_Row::SysApplyUpdates(Self=:011A2AD8,
SingleEventOnly=true)
00458512 Ib_components::TIB_Row::DoAfterModify(Self=:011A2AD8,
IB_Field=:011BB770)
0043069C
Ib_components::TIB_Dataset::SysAfterParamsDataChange(Self=:011A22C4,
Sender=:011A2AD8, AField=:011BB770)
0043422B Ib_components::TIB_Dataset::RefreshKeys(Self=:011A22C4)
00434ED8 Ib_components::TIB_Dataset::SysRefresh(Self=:011A22C4,
Rows=false, Keys=true)
0043D15C Ib_components::TIB_Dataset::EnableControls(Self=:011A22C4)
0043D331 Ib_components::TIB_Dataset::ProcessLinkEvent(Self=:011A22C4,
AEvent=22 /* setFieldsDataChange */, Info=0)
0042DB39
Ib_components::TIB_Statement::ProcessLinkEvent(Self=:011A22C4,
AEvent=22 /* setFieldsDataChange */, Info=0)
Any help appreciated.
Pablito