[Mono-dev] Issue Compiling on Red Hat Linux

JD Conley jd.conley at coversant.net
Fri Feb 10 19:11:03 EST 2006


I'd guess this is the problem:

 

                    string sysdate = (string)dbreader["sysdate"];

 

Use dbreader["sysdate"].ToString() or
Convert.ToString(dbreader["sysdate"]). If sysdate was a Date value in
your DB it won't directly cast to a string. You need to do a conversion.

 

-JD Conley

 

________________________________

From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Javier
Ruiz
Sent: Friday, February 10, 2006 3:23 PM
To: 'Jonel Rienton'; mono-devel-list at lists.ximian.com
Subject: RE: [Mono-dev] Issue Compiling on Red Hat Linux

 

That would help sorry here is the code.

 

________________________________

From: Jonel Rienton [mailto:jonel at rientongroup.com] 
Sent: Friday, February 10, 2006 4:20 PM
To: 'Javier Ruiz'; mono-devel-list at lists.ximian.com
Subject: RE: [Mono-dev] Issue Compiling on Red Hat Linux

hard to help without seeing any code

 

________________________________

From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Javier
Ruiz
Sent: Friday, February 10, 2006 4:08 PM
To: mono-devel-list at lists.ximian.com
Subject: [Mono-dev] Issue Compiling on Red Hat Linux

I'm running mono and I compile my program ok but when I run the program
I get the following error. I can run the program on windows with no
problems.

 

ERROR:

Unhandled Exception: System.InvalidCastExeception: Cannot cast from
source type to destination type.

 

Javier Ruiz

Oracle DBA

 

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.15.4/255 - Release Date: 2/9/2006

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060210/af1178f0/attachment.html 


More information about the Mono-devel-list mailing list