How can I switch from TEXT to BINARY frontend protocol?

How can I switch from TEXT to BINARY frontend protocol?

Postby elid » Wed 03 Feb 2010 17:57

Currently we work with the DevArt dotConnect to use a TEXT frontend protocol to interact with the PostresSql DB.

We read in the dotConnect spec that the dotConnect can work use binary protocol
to work faster.

How can I switch from TEXT to BINARY frontend protocol and vice versa?


thanks,

Eli
elid
 
Posts: 5
Joined: Sun 24 Jan 2010 17:09

Postby StanislavK » Thu 04 Feb 2010 10:53

Probably you mean the Mode property of the PgSqlLoader class. PgSqlLoader is used to load multiple rows into a table, and it can operate in text or binary mode. The binary mode is faster; you can set it in the Mode property of your PgSqlLoader object:
Code: Select all
pgSqlLoader1.Mode = PgSqlLoaderMode.Binary;

Please note that the Binary mode is available for PostgreSQL protocol 3.0 only. PostgreSQL servers from 7.4 and higher use it as default, but you may explicitly set it for your connection:
Code: Select all
PgSqlConnectionStringBuilder sb = new PgSqlConnectionStringBuilder(pgSqlConnection1.ConnectionString);
sb.Protocol = ProtocolVersion.Ver30;
pgSqlConnection1.ConnectionString = sb.ConnectionString;
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for PostgreSQL