Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Sometimes you´ve got to make a silent Takedown .
  • 2 weeks later...
  • *Experts*
Posted

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

"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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...