Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field passing
Message
De
15/02/2006 11:27:02
 
 
À
15/02/2006 11:21:14
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Divers
Thread ID:
01096481
Message ID:
01096500
Vues:
18
You can get the data type for the field by looking at the Columns collection:
MyDataSet.Tables["MyTable"].Columns[10].DataType
~~Bonnie



>And what should the parameter type be for the method?
>
>>Hey Craig,
>>
>>The code should be something like this:
>>
>>MyDataSet.Tables["MyTable"].Rows[0][10];
>>
>>What have you been trying?
>>
>>~~Bonnie
>>
>>>I have a single record from a dataset and I want to pass one field of that record to a method to do additional processing. I don't know the field name, but it's always in the same position in the table (field 10). I can't figure out how to reference the single field, then pass it. I keep getting a compile error, "An object reference is required for the nonstatic field". Anyone know how I can do this?
Bonnie Berent DeWitt
NET/C# MVP since 2003

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

Click here to load this message in the networking platform