ID numbering

  • Thread starter Thread starter Chuck Bowling
  • Start date Start date
What do you mean for unique ID?
You can always set the "ID" column as string and assign a Guid to it

MyDataSet.MyDataTableRow row=MyDataSet.MyDataTable.NewMyDataTableRow();
row.ID=new Guid();
MyDataSet.MyDataTable.Rows.Add(row);

If your "ID" is a integer and you want the autoincrement effect, go to the
xml view of the typed dataset and add in the xs:element tag of the "ID" the
following text
msdata:AutoIncrement="true"

so you shoud have something like

<xs:element name="ID" msdata:ReadOnly="true" msdata:AutoIncrement="true"
type="xs:int" />
 
Back
Top