Page 1 of 1

Connecting database to postgres to different schema then pub

Posted: Thu May 10, 2018 7:39 pm
by MichalCh
Hi,

We have a postgres database and we have three different schemas. Of course there is also the default one called "public" for all tables for postgres.
Unfortunately there is no way to connect to other schema or have some sort of choice. We're always connecting to the "public" one.

Will there be a fix for it or am I missing an option?

Best wishes,
Michal Choldrych

Re: Connecting database to postgres to different schema then

Posted: Fri May 11, 2018 7:46 pm
by Edward
Hi Michal/Vitaly,

Thank you for your request, but in order to help you, do you mind to email us a small sample that reproducing the issue, so we are able to reproduce the issue and to help in fixing the problem.

Thank you,
Edward
3153380

Re: Connecting database to postgres to different schema then

Posted: Mon May 14, 2018 9:23 am
by tayar
Hi,

I can't send you any report as it is not possible to create a report.
The steps to reproduce.
* Connect to postgres DB
* Create schema

Code: Select all

CREATE SCHEMA "ReportSchema";
* Create a table in this schema

Code: Select all

CREATE TABLE "ReportSchema"."ReportTable"
(
  "Id" uuid NOT NULL,
  "FirstName" text,
  "LastName" text,
  CONSTRAINT "PK_ReportTable" PRIMARY KEY ("Id")
)
WITH (
  OIDS=FALSE
);
* Open Stimulsoft Report Designer
* Connect to Potrgres DB (using NpgSQL)
* The table is not visible

Re: Connecting database to postgres to different schema then

Posted: Mon May 14, 2018 10:54 am
by Lech Kulikowski
Hello,

You can use the following option:
StiOptions.Engine.RetrieveSchemaNamePostgreSql = "schemaname";

Thank you.

Re: Connecting database to postgres to different schema then

Posted: Mon May 14, 2018 11:29 am
by tayar
Hi Lech,

Thanks for the response. This is a solution from to be used from the code.
is there anyway to use other schemas from the standard Stimulsoft Designer application?

Thanks
Vitaly

Re: Connecting database to postgres to different schema then

Posted: Wed May 16, 2018 9:10 am
by Lech Kulikowski
Hello,

Unfortunately, there is no option in PostgreSQL to specify schema name in the connection string.

Thank you.