Mischamel Posted July 16, 2003 Posted July 16, 2003 I´d like to do the following : Dataset11.Table.addPAMRow(Field1,Field2,???,FIeld3) Which value do i have to use for a field, for which I´ve got no entry. Or does every field require a value ??? Thanks Quote Sometimes you´ve got to make a silent Takedown .
angula Posted July 26, 2003 Posted July 26, 2003 What about this: Dim drPAM as DataSet11.TableRow drPAM.Field1 = drPAM.Field2 = drPAM.Field3 = DataSet11.Table.AddTableRow(drPAM) Quote
*Experts* Nerseus Posted July 29, 2003 *Experts* Posted July 29, 2003 Depends on what you want, Mischamel. You can use System.DBNull.Value as that what's 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. 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 you're using the built in DataSet builder which creates wrapper classes for each table/column. I would bet there's a way to get the equivalent of NewRow, in case the NewRow doesn't exist for you the way I used it above. If that doesn't make sense, let us know and I'm sure I can figure it out with a test project (don't have it here). -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.