[RESOLVED] Update problem
OleDbException Unhandled
I can't figure out why.
Code:
Private cnxnString As String = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\VDM\AIDS Action Committee\AAC047\AAC047.MDB")
Private cnxn As New System.Data.OleDb.OleDbConnection(cnxnString)
Private DataAdapter As New System.Data.OleDb.OleDbDataAdapter("SELECT * FROM [COMBINED NCOA]", cnxn)
Private CommandBuilder As New System.Data.OleDb.OleDbCommandBuilder(DataAdapter)
Private Table As New DataTable
Private Sub ButtonCheckDigit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCheckDigit.Click
DataAdapter.Fill(Table)
DataAdapter.UpdateCommand = CommandBuilder.GetUpdateCommand
DataAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
For Each row As DataRow In Table.Rows
row("TEST") = "XXX"
DataAdapter.Update(Table)
Next
MsgBox("Done")
End Sub