I am using the following code:
objXtra.Clear()
objConnection = New OleDbConnection(strConnectionString)
objCommand = New OleDbCommand
With objCommand
.CommandText = "INSERT INTO [Xtra] (Tabell) VALUES ('" & TextBox6.Text & "');"
.CommandType = CommandType.TableDirect
.Connection = objConnection
End With
objDataAdapter = New OleDbDataAdapter(objCommand)
objDataAdapter.Update(objXtra)
DataGridView2.DataSource = objXtra
objConnection.Dispose()
objConnection = Nothing
objCommand.Dispose()
objCommand = Nothing
objDataAdapter.Dispose()
objDataAdapter = Nothing
But it does not update the table, Caan anyone please help me out here,
objXtra.Clear()
objConnection = New OleDbConnection(strConnectionString)
objCommand = New OleDbCommand
With objCommand
.CommandText = "INSERT INTO [Xtra] (Tabell) VALUES ('" & TextBox6.Text & "');"
.CommandType = CommandType.TableDirect
.Connection = objConnection
End With
objDataAdapter = New OleDbDataAdapter(objCommand)
objDataAdapter.Update(objXtra)
DataGridView2.DataSource = objXtra
objConnection.Dispose()
objConnection = Nothing
objCommand.Dispose()
objCommand = Nothing
objDataAdapter.Dispose()
objDataAdapter = Nothing
But it does not update the table, Caan anyone please help me out here,