How to not-set a value in .addRow("....)

What about this:

Dim drPAM as DataSet11.TableRow

drPAM.Field1 =
drPAM.Field2 =
drPAM.Field3 =

DataSet11.Table.AddTableRow(drPAM)
 
Depends on what you want, Mischamel. You can use System.DBNull.Value as that whats in the dataset as a default (unless your DataColumn has a default set). You could also use NewRow and only set those columns you want, but it takes a few extra lines of code.

Code:
DataRow row = Dataset11.Table.NewRow()
row("Field1") = Field1
row("Field2") = Field2
Skip field3, go onto field 4
row("Field4") = Field4

I know you can call NewRow on a DataTable. Your syntax indicates youre using the built in DataSet builder which creates wrapper classes for each table/column. I would bet theres a way to get the equivalent of NewRow, in case the NewRow doesnt exist for you the way I used it above. If that doesnt make sense, let us know and Im sure I can figure it out with a test project (dont have it here).

-nerseus
 
Back
Top