Can anyone help with this question?
Zeos version: 7.2.14-release
Delphi Version: 10 - Seattle
Postgresql Version: 9.3
I'm trying create database with Zeos on runtime with ZSQLProcessor, but i receive this error:
CREATE DATABASE cannot run inside a transaction block
My script create database:
Code: Select all
ZSQLProcessor := TZSQLProcessor.Create(Self);
ZSQLProcessor.Connection := ConexaoLog;
script := 'CREATE DATABASE imagem '+
'WITH OWNER = postgres '+
'TABLESPACE = pg_default '+
'LC_COLLATE = ''Portuguese_Brazil.1252'' '+
'LC_CTYPE = ''Portuguese_Brazil.1252'' '+
'CONNECTION LIMIT = -1;';
ZSQLProcessor.Script.Text := script;
ZSQLProcessor.Execute;
ZSQLProcessor.free;
(because see in the image that I'm already passing it as itNone)
Thank you so much! Hugs