[Lazarus] TPQConnection.CreateDB: ENCODING, OWNER, TEMPLATE, LC_CTYPE, TABLESPACE
Michael Van Canneyt
michael at freepascal.org
Wed Oct 8 17:44:37 CEST 2014
On Wed, 8 Oct 2014, silvioprog wrote:
> Hello,
>
> I need to create a PostgreSQL database from my application. The TPQConnection.CreateDB works fine, but I need to configure some properties of my
> database in your creation.
>
> In pgAdmin, I execute:
>
> CREATE DATABASE myuser
> WITH ENCODING='UTF8'
> OWNER=myowner
> TEMPLATE=template1
> LC_CTYPE='Portuguese_Brazil.1252'
> CONNECTION LIMIT=-1
> TABLESPACE=pg_default;
>
> But, how to create a database with TPQConnection passing the ENCODING, OWNER, TEMPLATE, LC_CTYPE and TABLESPACE properties?
Try setting them as 'Name=Value' pairs in the Params property of the connection component.
Michael.
More information about the Lazarus
mailing list