Page 1 of 1

Does not work Insert() when CachedUpdates is true

Posted: Tue 26 Apr 2011 07:19
by Fastex
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.

Posted: Tue 26 Apr 2011 11:43
by AndreyZ
Hello,

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;
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.