[Mono-list] InvalidOperationException when using a DataAdapter's Update method (mono, npgsql)

Francisco Figueiredo Jr. fxjrlists at yahoo.com.br
Sun May 22 11:26:46 EDT 2005


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

Helge Lenuweit wrote:
> Hello folks,
> 

Hello Helge.

> I am seeing a weird InvalidOperationException being thrown when I use a
> (Npgsql)DataAdapter's update method in a particular setting. As I'm
> unsure where the error lies, I'm looking for help here before filing any
> bugs.
> 

This is an Npgsql bug.

DbDataAdapter is trying to read from the NpgsqlDataReader after
executing command but as it was an update command, there is no resultset
available and so, NpgsqlDataReader throws an exception about that. The
problem is that msdn docs don't say Read throws any type of exception
and so, NpgsqlDataReader is incorrectly throwning this exception instead
of just return false.

On MS.Net the error doesn't occur because for sure ms implementation
doesn't call read :)

Fixed in svn.

Thanks for feedback!



- --
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

iQEVAwUBQpCktv7iFmsNzeXfAQIpiQf/cHgQvc4Taq4BlbJq4kvWWV+TLK3LXqi6
+KaAVkqsYGCG8OCLX9jXqUTdMQAexLj4ASXaDJoVDFUJM8Q+9HZfmBQDBgmhIWJC
+4F0vVrgpHA4E93C0Yrx5v6hYzMvKrnrRgJrc4Y2lvF1KOboAxABNNUUoA1/jZak
g7JuA/oRIc0ahKeILm9YqJwxMJVvZHFO9uhVMdhIksjMrrsY/Ija4/15T0czz0fK
Qym8SVS15D5DPACsEN7fOcPQ0Mm2Mbmz8OvX3fMYuSHD/w357zrWQQx16GP5jbVh
twJzZDbHgcFcY3J00SsC22h8seuQGWSgGGMw0Z4B6zo2/y6h4q6OWA==
=Ls8i
-----END PGP SIGNATURE-----



More information about the Mono-list mailing list