Subject | TIB_Query: after an insert, how to return to current record? |
---|---|
Author | Hug |
Post date | 2001-04-25T12:43:29Z |
IB 6.01, IBO 3.6Cf, C++B 5
I have an updatable TIB_Query.
Under some circumstances, I must insert a new record on it, but without
loosing the position of current record.
I make:
TIB_Query1->Insert();
TIB_Query1->FieldByName("FIELD1")->Value=some value;
...
TIB_Query1->Post();
and then, all my attempts are vain. I try to reassign
TIB_Query1->RowNum=old_RowNum_value
or
TIB_Query1->BufferRowNum=old_BuffRowNum_value
even
TIB_Query1->KeyFieldByName("ID")->Value=old_value
TIB_Query1->SeekKeyForBufferFields();
but the data-aware controls on the form and the other TIB_Queries (which
have a master-datail relation) remains referencing the new, inserted,
record.
Which is the right way to get this? I want to avoid wasting another
component only for INSERT.
TIA
Hugo.
I have an updatable TIB_Query.
Under some circumstances, I must insert a new record on it, but without
loosing the position of current record.
I make:
TIB_Query1->Insert();
TIB_Query1->FieldByName("FIELD1")->Value=some value;
...
TIB_Query1->Post();
and then, all my attempts are vain. I try to reassign
TIB_Query1->RowNum=old_RowNum_value
or
TIB_Query1->BufferRowNum=old_BuffRowNum_value
even
TIB_Query1->KeyFieldByName("ID")->Value=old_value
TIB_Query1->SeekKeyForBufferFields();
but the data-aware controls on the form and the other TIB_Queries (which
have a master-datail relation) remains referencing the new, inserted,
record.
Which is the right way to get this? I want to avoid wasting another
component only for INSERT.
TIA
Hugo.