Page 1 of 1

create database for postgressql 8.2

Posted: 15.12.2007, 16:30
by angerp67
I Tried to create database at run-time with postgressql 8.2 and zeos 6.6.2

arc_fir.connected := false;
arc_fir.database := 'postgres';
arc_fir.connected := true;

ZSQLProcessor.Script.Text := 'CREATE DATABASE dbname WITH TEMPLATE = template0 ENCODING = ''UTF8'';';
ZSQLProcessor.Execute;

when i ran sql statement i receveid sql error

SQL Error: ERROR: CREATE DATABASE cannot run inside a transaction block.

Any Ideas
paolo

Posted: 15.12.2007, 21:26
by sandeep_c24
Set TransactiobIsolation to tiNone. It should work.

Regards

Sandeep

Posted: 18.12.2007, 17:55
by angerp67
It work fine

thank you
paolo