Multiple schema

Multiple schema

Postby arkangles » Sun 26 Apr 2009 13:29

The default schema is "public", and the setoption command apparently can only set this to one specific schema. Is there any way to be able to access all schema, or a specific list of schema at the same time?
arkangles
 
Posts: 3
Joined: Sun 26 Apr 2009 12:02

Postby Plash » Tue 05 May 2009 07:57

You can execute SET SEARCH_PATH command to use several schemas. For example:
Code: Select all
SQLConnection.ExecDirect('SET SEARCH_PATH TO public, schema2');
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby arkangles » Sun 24 May 2009 04:16

Doesn't seem to make any difference. I run

Code: Select all
SQLConnection.ExecuteDirect('SET SEARCH_PATH TO public, myschema');
SQLConnection.GetTableNames(MyList);


and MyList still only contains the tables and views that are in the PUBLIC schema. Is there some other setting I need to use as well?

--Rob.
arkangles
 
Posts: 3
Joined: Sun 26 Apr 2009 12:02

Postby Plash » Fri 12 Jun 2009 09:01

The GetTableNames method will always return the list of tables from one schema. This method uses the schema from the SchemaName extended driver option. You can see how to set the extended driver options in the ReadMe.html file.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09


Return to dbExpress driver for PostgreSQL