Public Sub AddingParentChildRecords()
Dim dbConn As New OleDbConnection(constConnectionString)
dbConn.Open()
Dim dbSet As New DataSet
Dim dbParentAdapt As OleDbDataAdapter
dbParentAdapt = New OleDbDataAdapter("SELECT * FROM TableParent", dbConn)
Dim dbParentCB As New OleDbCommandBuilder(dbParentAdapt)
dbParentAdapt.FillSchema(dbSet, SchemaType.Source)
Dim dbChildAdapt As New OleDbDataAdapter("SELECT * FROM TableChild", dbConn)
Dim dbChildCB As New OleDbCommandBuilder(dbChildAdapt)
dbChildAdapt.FillSchema(dbSet, SchemaType.Source)
Dim oParentRow As DataRow = dbSet.Tables("TableParent").NewRow()
oParentRow("ParentText") = Now().ToString
dbSet.Tables("TableParent").Rows.Add(oParentRow)
Dim oChildRow As DataRow = dbSet.Tables("TableChild").NewRow()
oChildRow("ChildText") = Now().Ticks.ToString