I'm new to VB 2005. I've programmed for a while in VB 6 mas now that I started with VB 2005 I've been a little lost!
I've the following code to add a new record to an MS Access database:
This is not working because I think I've some mistake in the last line:
Can annybody help me please?
Thanks,
João Pinto
I've the following code to add a new record to an MS Access database:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim newScrapRow As DataRow = ReportItDataSet.Tables("Scrap").NewRow()
ReportItDataSet.Tables("Scrap").Rows.Add()
newScrapRow("Tipo_Peça") = ScrapCombo
newScrapRow("Qtd") = Qtdfield
ReportItDataSet.Tables("Scrap").Rows.Add(newScrapRow)
ScrapTableAdapter.Update(ReportItDataSet, "Scrap")
End Sub
This is not working because I think I've some mistake in the last line:
Code:
ScrapTableAdapter.Update(ReportItDataSet, "Scrap")
Can annybody help me please?
Thanks,
João Pinto