Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Specified cast is not valid
Message
From
01/06/2010 13:00:24
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01466885
Message ID:
01466911
Views:
38
>>>Try getting a Value and also compare it first with DbNull.Value
>>>
>>
>>Hi Naomi,
>>
>>I'm not sure what you mean by the above. The problem I am having is that a default value is not getting populated when it should be by the framework I am using (MM.NET). I assume this is due to me having forgotten to set something as it works elsewhere.
>
>My suggestion was to overcome the error. In order for the cast to be valid, you need to use Value property of the Ds.Row and also you need to make sure it's not null.

OK. I have fixed the problem. I realised I had generated my business layer for this table once without setting the default value and then with an incorrect name. So I was seeing the default setting code, but it was in the wrong class. Once I fixed that everything works.

Thanks for your time
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform