EXECUTING SEVERAL SQL COMMANDS IN ONE TRIP

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
JORGEMAL
Posts: 171
Joined: Thu 03 Jul 2008 23:55

EXECUTING SEVERAL SQL COMMANDS IN ONE TRIP

Post by JORGEMAL » Wed 10 Sep 2008 18:10

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?

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 11 Sep 2008 13:03

It is possible only with protocol 2.0. To enable it you should include in connection string "Protocol=2".

Post Reply