create database for postgressql 8.2

Forum related to PostgreSQL

Moderators: gto, cipto_kh, EgonHugeist, olehs

Post Reply
angerp67
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 15.12.2007, 16:26

create database for postgressql 8.2

Post 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
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

Set TransactiobIsolation to tiNone. It should work.

Regards

Sandeep
angerp67
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 15.12.2007, 16:26

Post by angerp67 »

It work fine

thank you
paolo
Post Reply