[Mono-dev] Mono-devel-list Digest, Vol 34, Issue 38
Przemyslaw Soldacki
psoldack at wp.pl
Wed Feb 20 16:28:00 EST 2008
As far as I know you in Mono can get column by index (int) not by name
(string). Getting by name works in .NET but not in Mono.
Looks like your supplying string and compiler is trying to cast it to int.
Just a guess...
> Date: Wed, 20 Feb 2008 17:00:22 +0100
> From: Marek Habersack <grendello at gmail.com>
> Subject: Re: [Mono-dev] xsp issu
> To: "Sharique uddin Ahmed Farooqui" <safknw at gmail.com>
> Cc: Zoltan Varga <vargaz at gmail.com>, mono-devel
> <mono-devel-list at lists.ximian.com>
> Message-ID: <20080220170022.701b9c99 at gmail.com>
> Content-Type: text/plain; charset=US-ASCII
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Wed, 20 Feb 2008 09:58:06 +0530
> "Sharique uddin Ahmed Farooqui" <safknw at gmail.com> wrote:
>
>> HI,
> Hi,
>
>> I run with xsp2, it get this error.
>> Server Error in '/' Application
>> ------------------------------
>> *Cannot cast from source type to destination type.*
>>
>> *Description: *Error processing request.
>>
>> *Error Message: *HTTP 500. System.InvalidCastException: Cannot cast from
>> source type to destination type.
>>
>> *Stack Trace: *
>>
>> System.InvalidCastException: Cannot cast from source type to destination
>> type.
>> at System.DateTime.System.IConvertible.ToInt32 (IFormatProvider
>> provider) [0x00000]
>> at System.Convert.ToInt32 (System.Object value, IFormatProvider
>> provider) [0x00000]
>> at System.Convert.ToInt32 (System.Object value) [0x00000]
>> at System.Data.Common.AbstractDataContainer+Int32DataContainer.set_Item
>> (Int32 index, System.Object value) [0x00000]
>> at System.Data.DataColumn.set_Item (Int32 index, System.Object
>> value) [0x00000]
> It's impossible to say what the issue is without the application source,
> but the
> problem in this case might be either in the data you feed System.Data
> with, or in
> System.Data itself.
>
> best regards,
>
> marek
More information about the Mono-devel-list
mailing list