#1 2021-09-23 12:28:53

wxinix
Member
Registered: 2020-09-07
Posts: 121

Potential Bug? mormot.db.sql.postgres TSqlDBPostgresStatement.Execute

mormot.db.sql.postgres, TSqlDBPostgresStatement.Execute

line 624

 fTotalRowsRetrieved := PQ.ntuples(fRes); 

Would throw Exception ESqlDBPostgres, with message
"TSqlDBPostgresStatement.ExecutePrepared: result expected but statement did not return tuples'.

The statement being executed is
fSql 'CREATE SCHEMA IF NOT EXISTS test'

Offline

#2 2021-09-23 13:38:42

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

Re: Potential Bug? mormot.db.sql.postgres TSqlDBPostgresStatement.Execute

You should rather try ExecuteNoResult() I guess for such statements with no result.

Offline

#3 2021-09-23 14:32:48

wxinix
Member
Registered: 2020-09-07
Posts: 121

Re: Potential Bug? mormot.db.sql.postgres TSqlDBPostgresStatement.Execute

ab wrote:

You should rather try ExecuteNoResult() I guess for such statements with no result.

Thank you. Yes - that works.

Offline

Board footer

Powered by FluxBB