
Adding new records to a dataset
Well, you don't add a row to a dataset, you add it to a datatable:
'create the new row
dim drNew as System.Data.DataRow
drNew = me.myDataSet.myDataTable.NewRow
'set the value
drNew.Item("myField") = whatever
'append it to the table
me.myDataSet.myDataTable.Rows.Add(drNew)
HTH
--
Rebecca Riordan
Designing Relational Database Systems
http://mspress.microsoft.com/books/3222.htm
Microsoft SQL Server 2000 Programming Step by Step
http://mspress.microsoft.com/prod/books/4713.htm
Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
Quote:
> Does anyone have an example of adding a new record to a
> dataset? I have 2 bound text boxes on my form which work
> okay. I run into problems because I have a 3rd column in
> the table I want to set through the code before I update.
> Thanks