Subject | Re: [IBO] state |
---|---|
Author | Helen Borrie |
Post date | 2003-08-13T21:51:18Z |
At 06:30 PM 13/08/2003 +0000, you wrote:
custom xxxxSQL properties).
Do you have KeyLinks set?
dssInsert, respectively:
if (not (MyQuery.State in [dssEdit, dssInsert])) then
MyQuery.Edit; // or MyQuery.Insert
else
// do something about the pending work on this record
if MyQuery.ib_transaction.TransactionIsActive then
try
MyQuery.Post;
MyQuery.ib_transaction.Commit;
except
// call appropriate exception handler
end;
(apologies for Delphi code)
Helen
>Not working - got exception, that can't edit current record. AlthoughDo you have an editable dataset? Show us your SQL statement. (You may need
>TIB_Datasource has autoedit & autoinsert set to true,
custom xxxxSQL properties).
Do you have KeyLinks set?
>but I need toIf the dataset is editable, call Edit or Insert to place it into dssEdit or
>set edit/insert state manually
>Now in TIB_Edit is displayed first entry and I can't edit it until set
>insert/edit state manually :-/
dssInsert, respectively:
if (not (MyQuery.State in [dssEdit, dssInsert])) then
MyQuery.Edit; // or MyQuery.Insert
else
// do something about the pending work on this record
>Commit isn't TIB_Query member, so how to call manual commit (ifif MyQuery.NeedToPost then
>autocommit is set to false)?
if MyQuery.ib_transaction.TransactionIsActive then
try
MyQuery.Post;
MyQuery.ib_transaction.Commit;
except
// call appropriate exception handler
end;
(apologies for Delphi code)
Helen