Page 1 of 1

TUniSQL with PostgreSQL

Posted: Sat 20 May 2017 13:48
by ertank
Hello,

My main use of TUniSQL is for multiple command execution. By default TUniSQL.SpecificOptions.UnpreparedExecute is set to True.

This is not a problem for Microsoft SQL Server. However, PostgreSQL cannot insert multiple commands into a prepared statement.

Is it possible to define a project wide setting for all TUniSQL components so that their SpecificOptions.UnpreparedExecute will be set to False?

Or, is it possible to turn this parameter to False by default if provider is PostgreSQL?

Thanks & regards,
Ertan

Re: TUniSQL with PostgreSQL

Posted: Wed 24 May 2017 09:41
by azyk
To solve the specified issue you can use one of the following solutions:

- to execute multiple SQL queries you can use the TUniScript component: https://www.devart.com/unidac/docs/?dev ... script.htm

- in the code of a custom application set the specific option UnpreparedExecute to True for each TUniSQL instance

- use the protocol 2.0 to connect to PostgreSQL. For this, you need to set TUniConnection.SpecificOptions.Values['PostgreSQL.ProtocolVersion'] to the 'pv20' value.