G
Guest
I need help:
I want to add a new row to an Access Table "Table1"
with its default values, but it doesn't work at all.
Here is the code:
Dim Adapter As OleDb.OleDbDataAdapter
Dim Dataset As New Data.DataSet
Dim DataTable As New Data.DataTable
Dim DataRow As System.Data.DataRow
Adapter = New OleDb.OleDbDataAdapter("SELECT * FROM Table1", Connection)
Adapter.Fill(Dataset, "Table1")
DataTable = Dataset.Tables( "Table1")
DataRow = DataTable.NewRow
DataTable.Rows.Add(DataRow)
Adapter.Update(Dataset, "Table1")
I want to add a new row to an Access Table "Table1"
with its default values, but it doesn't work at all.
Here is the code:
Dim Adapter As OleDb.OleDbDataAdapter
Dim Dataset As New Data.DataSet
Dim DataTable As New Data.DataTable
Dim DataRow As System.Data.DataRow
Adapter = New OleDb.OleDbDataAdapter("SELECT * FROM Table1", Connection)
Adapter.Fill(Dataset, "Table1")
DataTable = Dataset.Tables( "Table1")
DataRow = DataTable.NewRow
DataTable.Rows.Add(DataRow)
Adapter.Update(Dataset, "Table1")