Jonas Malmsten
Member²
I insert e new record in a table (TOracleDataset). The primary key is assigned automatically by a trigger. I would like the end user to be able to see this primary key right after creating a new record (after calling Table1.Insert).
I set RefreshOptions = [roAfterInsert]
If I do
Table1.Insert;
Table1.Post;
Table1.Edit; // Error occur here
I end up with an error (A lock, refresh or check cannot be performed without a rowid.....) but if I assign a value to one of the fields in the table in between, for example
Table1.Insert;
Table1FIRST_NAME.AsString := 'something';
Table1.Post;
Table1.Edit;
it works just the way I want, except for that the first name is set to something.
I'm using the evaluation version of DOA 3.4.4 for Delphi 5.
Btw. I have a registered version of DOA 3.4.1 but I cannot find where to download an update.
//Jonas
I set RefreshOptions = [roAfterInsert]
If I do
Table1.Insert;
Table1.Post;
Table1.Edit; // Error occur here
I end up with an error (A lock, refresh or check cannot be performed without a rowid.....) but if I assign a value to one of the fields in the table in between, for example
Table1.Insert;
Table1FIRST_NAME.AsString := 'something';
Table1.Post;
Table1.Edit;
it works just the way I want, except for that the first name is set to something.
I'm using the evaluation version of DOA 3.4.4 for Delphi 5.
Btw. I have a registered version of DOA 3.4.1 but I cannot find where to download an update.
//Jonas