Hello,
I use UniTable with property "CachedUpdates" = true. If I try run my project with "CachedUpdates" = true then method Insert doesn't work. If I try with "CachedUpdates" = false, Insert works. I need to use CachedUpdates and method Insert. How can I do this?
A lot of thanks.
Does not work Insert() when CachedUpdates is true
-
AndreyZ
Hello,
Try using the following code:If it doesn't work on your machine, please specify the following:
- the exact version of UniDAC. You can learn it from the About sheet of TUniConnection Editor;
- the exact version of your IDE;
- the exact database server you are working with.
Try using the following code:
Code: Select all
UniTable.TableName := 'your_table';
UniTable.CachedUpdates := True;
UniTable.Open;
UniTable.Insert;
// fill field values, for example, UniTable.FieldByName('your_int_field').AsInteger := 1;
UniTable.Post;
UniTable.ApplyUpdates;- the exact version of UniDAC. You can learn it from the About sheet of TUniConnection Editor;
- the exact version of your IDE;
- the exact database server you are working with.