EXECUTING SEVERAL SQL COMMANDS IN ONE TRIP

EXECUTING SEVERAL SQL COMMANDS IN ONE TRIP

Postby 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?
JORGEMAL
 
Posts: 165
Joined: Thu 03 Jul 2008 23:55

Postby 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".
Shalex
Devart Team
 
Posts: 7774
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL