This is probably a real dumb question, but I can't seem to figure out how to actually write data to an Access database I'm using. I can read the data fine using the following code, where QuerySQL is an SQL Select Statement.
I can read the data fine and even write to it by doing something like this:
When I run the .AcceptChanges method, everything seems to work fine, but it's not actually writing to the underlying database. What do I need to do in order to actually write the data?
Thanks! -- Mike
Code:
If objConn.State.Equals(ConnectionState.Closed) Then OpenDatabase()
objAdapter = New OleDbDataAdapter(QuerySQL, objConn)
objDataSet.Tables.Add("tblMain")
objAdapter.Fill(objDataSet.Tables("tblMain"))
I can read the data fine and even write to it by doing something like this:
Code:
objDataSet.Tables("tblMain").Rows(0).Item(0) = 1
When I run the .AcceptChanges method, everything seems to work fine, but it's not actually writing to the underlying database. What do I need to do in order to actually write the data?
Thanks! -- Mike