Code: Select all
PgSqlCommand pgCommand = new PgSqlCommand("select column_name from table_name", myPgConnection);
pgCommand.FetchAll = false;
pgCommand.FetchSize = 10000;
pgSqlDataReader pgReader = pgCommand.ExecuteReader();
long Counter = 0;
while(pgReader.Read())
++Counter;
Console.WriteLine("{0} records read", Counter);
Code: Select all
while(pgReader.Read())
++Counter;
Console.WriteLine("{0} records read", Counter);
I'm not sure if this is a potential bug, me not using the feature correctly, or some weird configuration on my system, but thought I'd throw it your way for comment.
Cheers,
Jon.