pulling my hair out (again)

  • Thread starter Thread starter Vax
  • Start date Start date
V

Vax

Guest
... if I keep this up, Ill be bald before Im 30...

I have an OledbDataAdapter connected to a Microsoft Access (.mdb) database. I can populate a dataset based off a query no problem from aforementioned database, but I cant get the freakin dataset to write back to the database!

code looks something like this:

dbConnection.ConnectionString="....."
dbConnection.Open()
dbAdapter.SelectCommand.CommandText="SELECT ....."
dbAdapter.Fill(myDataTable)
myDataGrid.DataSource=myDataTable


Sub Update()
myDataTable.AcceptChanges()
dbAdapter.Update(myDataTable)
End Sub

Im sure theres something obvious Im missing, but I cant for the life of me figure out what it is I can pull up data already in the database, so I know the connection is good, but none of my data will write to the database. The connection is made with the ShareDenyNone mode. Any ideas?
 
Heads Up

Well, I figured it out.

Apparently, a single piece of data exceeded the length constraints on the database field. This in turn caused the entire dataset update to fail, without raising an error, warning, or peep... I had to do it with 50,000 INSERT SQL queries instead of one nice dataset to find this little flaw.... gah, I need a beer....
 
Back
Top