Page 1 of 1

TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Wed 15 Oct 2014 06:39
by Christoph
Hi,
I used to be able (before XE7?) to do this with SQLite :

Code: Select all

procedure SaveData(var aDataRec : TDataRec);
var q : TUniQuery;
begin
 q := TUniQuery.Create(Self);
 try
  with q do begin
    Connection:=UniConnection1;
    SQL.Text:=Format('select * from myTable where ID=%d',[aDataRec.ID]);
    open;
    if RecordCount=0
       then append
       else edit;
 // ID is auto incremented
    FieldByName('myData').AsString := aDataRec.MyData;
    post;
    aDataRec.ID := FieldByName('ID').AsInteger;
  end; // with q
 finally
  q.Free;
end;
Instead of calling "select last_insert_rowid() id" I used to do get the new value for my primary key from FieldByName('ID').AsInteger after the POST. However it does not work anymore!!??

SQLite :

Code: Select all

CREATE TABLE `MyTable` (
	`ID` INTEGER PRIMARY KEY AUTOINCREMENT,
	`myData` varchar(35)
  );
Please advise.
Thanks
Christoph

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Wed 15 Oct 2014 07:15
by AlexP
Hello,

We cannot reproduce the problem on the latest UniDAC version. Try to reproduce the problem on the latest UniDAC trial version: http://www.devart.com/unidac/download.html , and let us know the results

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Wed 15 Oct 2014 10:12
by Christoph
Hi,
thanks for your quick reply.
Like you, I created a little test project, and everything worked fine.
However, my current project still does not behave as expected.
If you do not mind, please download my echo_db project from
http://www.ckcmed.com.au/test/echo_db.zup and have a look yourself.
Thanks again for your timely response.
Cheers
Christoph

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Wed 15 Oct 2014 11:16
by AlexP
Thank you for the sample. We have reproduced and fixed the problem. The fix will be included into the next build.

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Thu 16 Oct 2014 06:01
by Christoph
Thanks. Do you have an estimated date of release?

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Thu 16 Oct 2014 06:57
by AlexP
We are going to release the new build within a month.

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Thu 20 Aug 2015 09:53
by jbucher
Hi,
seems that this problem is back with Version 6.1.6!!!

Re: TUniQuery and LiveBinding - SQLite Dataset does not refresh after post

Posted: Thu 27 Aug 2015 10:47
by AlexP
The example Christoph sent on the current version works properly, please send your example to alexp*devar*com