[Mono-list] Npgsql.dll

Carl Olsen carl at carl-olsen.com
Sat May 14 16:17:09 EDT 2005


I have the page working better now, but the stored procedures aren't doing
what I want.  I'm using an sql stored procedure that returns a set of
records.  My function is called senators() - ("select * from
senate_members") and it returns the entire table.  The Npgsql command text
is "select field1(senators()), field2(senators())" and it returns the
information correctly.  I was just hoping I could write ("select field1,
field2 from senators") as the function instead of returning the entire
table.  It seems like the stored procedures in MSSQL 2000 are a lot better
than the stored procedures in PostgreSQL, but maybe I still don't know what
I'm doing.  I could just as easily execute this query directly on my
database and return only the two fields I need.  The stored procedure isn't
giving me any increase in efficiency, and it actually appears to be less
efficient.

-----Original Message-----
From: mono-list-bounces at lists.ximian.com
[mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Francisco
Figueiredo Jr.
Sent: Saturday, May 14, 2005 11:24 AM
To: mono-list at lists.ximian.com
Subject: Re: [Mono-list] Npgsql.dll

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Carl Olsen wrote:
> I got around my problem by doing a "try ... catch" around the database
> connection and doing a redirect back to the page in the "catch" section.
> It's not perfect, but it keeps the page from throwing an error when I hit
> the refresh button.
> 


Also, althought not recommended, you could turn connection pooling off,
with Pooling=No in your connection string.

The problem would be that connection startup time of Npgsql connection
is a little long and you could suffer of low performance. :(




- --
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://gborg.postgresql.org/project/npgsql
MonoBrasil Project Founder Member
http://monobrasil.softwarelivre.org


- -------------
"Science without religion is lame;
religion without science is blind."

                  ~ Albert Einstein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBQoYmBv7iFmsNzeXfAQLlxAgAgA4gNOZwfpH3KhycBR4E3j3gjnYaYSRP
KOUf5FSG+GLU8T4g1zqWsOHDMFhu62fNLxNTSnD6DiDtzzsKpjXanhbcawb8pFn1
Zwrphyr3a/+F6heT94kOsbgJ6SEM+6hlQC0RO9HNIk2OFl8V5Q0uM1PzJiUgNmh+
PxCqDuOpeiBDDd5m5VXEzkHrHvrnivuVasClBETxl6l5qurA7r37x4Lbxuk+z6eh
DO+gFDPA8yr1yvQB4EyIxrA1Im6uz9ZlQc5VYRgrLAadLVIlBMlvSY6m3h57BbXt
ofBp+DQw1KTB7LQHbbsZ3JJ5pEmJcfkJxxjRwqHbc13D/B1KijWfZg==
=4t9k
-----END PGP SIGNATURE-----

_______________________________________________
Mono-list maillist  -  Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list





More information about the Mono-list mailing list