[Mono-dev] Issue Compiling on Red Hat Linux

Javier Ruiz javierruiz at houston.rr.com
Fri Feb 10 20:40:12 EST 2006


That worked thanks I know why it was working on Windows because I had no
connection to the database.

  _____  

From: JD Conley [mailto:jd.conley at coversant.net] 
Sent: Friday, February 10, 2006 6:11 PM
To: Javier Ruiz; Jonel Rienton; mono-devel-list at lists.ximian.com
Subject: RE: [Mono-dev] Issue Compiling on Red Hat Linux



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/733803fc/attachment.html 


More information about the Mono-devel-list mailing list