#1 2015-11-01 09:36:22

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

[NOT-A-BUG] TSQLRestClientURI.ExecuteList() doesn't work with Views?

update: It turned out to be a logical bug in my program but not a problem of the mORMot framework. I'm sorry.


Hi Arnaud,

The code:

var
  tmpTable: TSQLTableJSON;
begin
  tmpTable := aDb.ExecuteList([], aSql);
end


I found that TSQLRestClientURI.Execute() returns zero rows for this SQL:

SELECT CurrentStock FROM v_Inventory WHERE (ID = 12345)


It returns zero row, but I use Sqlite Studio and it should return one row. What might be wrong?

Thanks.

Last edited by edwinsn (2015-11-03 07:02:53)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2015-11-01 22:02:05

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,242
Website

Re: [NOT-A-BUG] TSQLRestClientURI.ExecuteList() doesn't work with Views?

Perhaps the connection properties are not set properly.

Offline

#3 2015-11-02 06:22:40

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: [NOT-A-BUG] TSQLRestClientURI.ExecuteList() doesn't work with Views?

ab, what connection properties do you mean? The TSQLRestClientURI in question is already working with other type of 'select' statements...


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#4 2015-11-02 07:06:21

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,242
Website

Re: [NOT-A-BUG] TSQLRestClientURI.ExecuteList() doesn't work with Views?

Do not use SQL statements, but ORM methods.

For security reasons, SQL statement execution may not be allowed from client side.

Offline

#5 2015-11-02 13:21:29

edwinsn
Member
Registered: 2010-07-02
Posts: 1,215

Re: [NOT-A-BUG] TSQLRestClientURI.ExecuteList() doesn't work with Views?

Hi ab,

I'm really sorry, after spent hours of checking, it turned out to be a logical bug in my program but not a problem of the mORMot frame itself. I will update the original topic above.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB