Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field passing
Message
De
15/02/2006 12:59:04
 
 
À
15/02/2006 12:53:35
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
01096481
Message ID:
01096541
Vues:
14
Even if the field did not contain any data (and was DBNull.Value), it should still work. And I don't see why static should make any difference either.

You changed the ConvertField() method to accept an object instead of the byte[]?

~~Bonnie



>Two things:
>
>1. I had to define ConvertField as static.
>2. Runtime error when calling the method:
>NullReferenceException was unhandled. Object reference not set to an instance of an object.
>
>There *IS* data in the field. I can't believe it's this difficult to pass a field to a method.
>
>>OK, first of all, your ConvertFields() method should be accepting an object (since that's what you're passing it):
>>
>>ArrayList ConvertField(object theData)
>>{
>>  ArrayList result = new ArrayList();
>>  result.Add(theData);
>>  return result;
>>}
>>
>>
>>~~Bonnie
>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform