[Mono-list] Npgsql myCommand.ExecuteScalar type cast issue

Joe Audette joe_audette at yahoo.com
Fri Dec 23 21:47:53 EST 2005


Being close to christmas not everyone may be reading the mail but Francisco is the developer of npgsql and I know he follows this list.
 
 You can reach him here:
 http://pgfoundry.org/users/fxjr/
 
 and this is the home page for the npgsql project
 http://pgfoundry.org/projects/npgsql
 
 you may want to pose your question in the forums there.
 
 Cheers,
 
 Joe 
 
joe_audette [at] yahoo dotcom 
http://www.joeaudette.com 
http://www.mojoportal.com

----- Original Message ----
From: Christopher Bergström <cbergstrom at netsyncro.com>
To: Mono List <mono-list at lists.ximian.com>
Sent: Friday, December 23, 2005 4:22:08 PM
Subject: [Mono-list] Npgsql myCommand.ExecuteScalar type cast issue

Joe Audette wrote:

>I think 
>i = Convert.ToInt32(myCommand.ExecuteScalar());
>
>will work
>
>Hope it helps,
>
It does help and thank you.. On the other hand it raises a question.. 
(Which if one of the Npgsql guys is on the list maybe he/she can answer)..

With SQL server the (int) type casting works.. Which brings the question 
of why not for Npgsql?  I mean.. It's returning either an object or a 
string.. (I think an object if I read the doc properly)  So I should be 
able to unbox it the same way?  This is looking like an undocumented 
feature and I'm thinking it's maybe on the Npgsql side of things..

Cheers,

C.
_______________________________________________
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