Re: Behavior of NpgsqlDataReader in NpgSql 1 and NpgSql 2

From: "Francisco Figueiredo Jr(dot)" <francisco(at)npgsql(dot)org>
To: Nishkarsh <nishkarsh_k(at)rediffmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Behavior of NpgsqlDataReader in NpgSql 1 and NpgSql 2
Date: 2009-06-12 18:04:09
Message-ID: 438d02260906121104q5356e7f7ocecce042cfdddf43@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 12, 2009 at 07:35, Nishkarsh<nishkarsh_k(at)rediffmail(dot)com> wrote:
>
> Hello every one,
>
Hello, Nishkarsh!

> I have a Vb 2005 application with postgres 8.2 as DB.
>
> I was trying to move from Pg 8.2 to 8.3.7, the installation went well. Once
> i tried running my application i got some errors. After doing some research
> i realized that.
>
> - NpgsqlDataReader in NpgSql 1 was capable to retain the records even eve
> after the connection is closed but it is not happening with NpgSql 2
>
> After doing a bit of googleing i was not able to find any info on it.
>
> Can any one plz tel me that is it the case or i have to do some modification
> in the code. If that is the case then is there any other object which can be
> used the way i was using NpgsqlDataReader in NpgSql 1
>

Thanks to google Alert, I received a mail about your post here with the answer:

http://forums.devshed.com/postgresql-help-21/behavior-of-npgsqldatareader-in-npgsql-1-and-npgsql-2t-617614.html

I'm quoting it here for historical purposes. Post from user Pabloj:

"Not an expert on this but, as per it's site:
Quote:
Improved performance for large resultsetsifferent from Npgsql1,
Npgsql2 doesn't read all table contents before returning control to
user code. This makes Npgsql much more memory efficient when dealing
with large tables. Thanks Jon Hanna for this.
Check User Manual for more info about that and how to revert to old
behavior of loading all data if you need it.
Which might be related to the problem you're experiencing.
Check the user manual under Preload Reader(manual is here )
Note that, from the same site
Quote:
... Npgsql2 had a lot of improvements which represents a much more
stable product, more bugs fixed and many implemented methods. It is
strongly advised that current users update from Npgsql1 to Npgsql2"

I hope it helps.

--
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior
Sent from Brasilia, DF, Brazil

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-06-12 18:38:44 Re: search for partial dates
Previous Message Bryan Murphy 2009-06-12 16:35:11 Re: Having trouble restoring our backups