Adding rows to a dataset.
-
This is a simple yet strange (to me) problem.In one project I can add rows to a dataset by: Dataset created dsWaterReadings and datatable inside it dtWater. dsWaterReadings.dtWater.Rows.Add("value1", "value2") In the other project I have created the same dsWaterReadings and dtWater Now if I type: dsWaterReadings.dtWater it forces me to chose dtWaterDataTable and that does not have a rows property. Using dtWaterRow yeilds even less properties. What could the difference be. All references are idential apart from System.Configuration (which I dont think is the problem) Many thanks Andrew
-
This is a simple yet strange (to me) problem.In one project I can add rows to a dataset by: Dataset created dsWaterReadings and datatable inside it dtWater. dsWaterReadings.dtWater.Rows.Add("value1", "value2") In the other project I have created the same dsWaterReadings and dtWater Now if I type: dsWaterReadings.dtWater it forces me to chose dtWaterDataTable and that does not have a rows property. Using dtWaterRow yeilds even less properties. What could the difference be. All references are idential apart from System.Configuration (which I dont think is the problem) Many thanks Andrew
ensure that you have the datatable adapter define in your program so it can bring forward the table you want to add rows on for example dim da as new da.DBdataadapter.table dim dt as new dt.datasettable this will ensure you can call anytable on your database
-
ensure that you have the datatable adapter define in your program so it can bring forward the table you want to add rows on for example dim da as new da.DBdataadapter.table dim dt as new dt.datasettable this will ensure you can call anytable on your database