Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Specified cast is not valid
Message
De
01/06/2010 13:00:24
 
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01466885
Message ID:
01466911
Vues:
40
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform