Page 1 of 1

EXECUTING SEVERAL SQL COMMANDS IN ONE TRIP

Posted: Wed 10 Sep 2008 18:10
by JORGEMAL
I read that it is possible to execute several SQL commands in one trip to the server, for example, 2 SELECT statements for 2 different tables and get the data of the second result set using the NextResult method of a DataReader. I tried to do it with PostgreSQLDirect and I got the following message:

CoreLab.PostgreSql.PgSqlException: cannot insert multiple commands into a prepared statement

Isn't this possible with PostgreSQLDirect.NET?

Posted: Thu 11 Sep 2008 13:03
by Shalex
It is possible only with protocol 2.0. To enable it you should include in connection string "Protocol=2".