Anonymous

It seems that when I run the software, postgre creates a transaction and in that situation postgre can't create a database.All we have to do is end the transaction, create the database and, done!

try// the SQL codesql:= 'CREATE DATABASE teste;';// that is the point: end the transaction, the postgre command for this it's 'Commit work'PQConnection1.ExecuteDirect('Commit Work;');// Now, with execute direct, a run de SQL command directly in postgrePQConnection1.ExecuteDirect(sql);