Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a row to a dataset
Message
De
06/08/2004 14:06:45
 
 
À
06/08/2004 13:48:36
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
00931376
Message ID:
00931380
Vues:
21
Can somebody tell me what is wrong with this code?

Dim rowNew As DataRow
rowNew = gModelTagsDS.Tables("header").NewRow()
rowNew("model") = Trim(txtModelNum.Text)
rowNew("modeldesc") = Trim(txtModelDesc.Text)
rowNew("partdesc") = desc
rowNew("quantity") = temp


I get an Object reference not set to an instance of an object error.


Hi, Mike,

Exactly which line is it dying on? Try tracing through it, and look at all of your variables and objects in the watch window. At least one of them hasn't been initialized, so it will probably show as 'null', 'undefined', etc.

Kevin
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform