Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting a row into a data set
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01257767
Message ID:
01257772
Views:
16
Hi Kevin,

I would set a breakpoint, run it in debug and check in the Locals or Watch window to see if your objects are instantiated, in scope etc.

Bill

>When I run the code below, I get "Object reference not set to an instance of an object." on the line with the NewRow() call.
>
>What am I doing wrong here?
>
>
>DataRow oDataRow;
>
>oDataRow = oDataSet.Tables["mnuTabs"].NewRow();
>oDataRow["ProductKey"] = 1;
>oDataRow["Sequence"] = 100;
>oDataRow["TabCaption"] = "Stuff";
>
>oDataSet.Tables["mnuTabs"].Rows.Add(oDataRow);
>
>
>Thanks
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform