Dim anyrow As DataRow = DS_stuname.Tables("资料表名").NewRow
anyrow.Item("stuname") = TextBox1.Text
anyrow.Item("tel_no") = TextBox2.Text
DS_stuname.Tables("资料表名").Rows.Add(anyrow)
Dim objDataSetChanges As DS_stuname= New DS_stuname()
objDataSetChanges = CType(DS_stuname.GetChanges,YourType )
If (Not (objDataSetChanges) Is Nothing) Then
Try
Me.UpdateDataSource(objDataSetChanges)
Adapter_stuname.Update(DS_stuname)
DS_stuname.AcceptChanges()
Catch eUpdate As System.Exception
Throw eUpdate
End Try
End If