N
NYWGUY54
I am trying to save changes to a dataset using the dataAdapters update method
to an Access 2003 DB, therefore I'm using an OleDbDataAdapter to accomplish
this.
I am using a For/Next loop to change a single column of data in the
dataTable, & I know this works. The problem arises when I try to write the
changes to the Access DB, nothing happens but the code process properly. I
use virtually the same code set in another project writing to a SQL server DB
& that works just fine. Is there some issue with OLEDB & Jet that this does
not work or that i must do something different?
Just for laughs I included a code snipit of what i'm doing.
Try
Conn.Open()
daVoters.Update(dsCommittee, "Voters")
Conn.Close()
dsCommittee.AcceptChanges()
Catch ex As OleDb.OleDbException
Conn.Close()
MessageBox.Show("There was an error updating the Database" &
vbCr & vbLf & ex.Message, "Prep Data", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
BTW I can do this by writing each change to the DB as I change it in the
datatable, but this requires me to open & close the connection nearly 1/2
million times (there are over400,000 records in the DB)
Thanks
Gary
to an Access 2003 DB, therefore I'm using an OleDbDataAdapter to accomplish
this.
I am using a For/Next loop to change a single column of data in the
dataTable, & I know this works. The problem arises when I try to write the
changes to the Access DB, nothing happens but the code process properly. I
use virtually the same code set in another project writing to a SQL server DB
& that works just fine. Is there some issue with OLEDB & Jet that this does
not work or that i must do something different?
Just for laughs I included a code snipit of what i'm doing.
Try
Conn.Open()
daVoters.Update(dsCommittee, "Voters")
Conn.Close()
dsCommittee.AcceptChanges()
Catch ex As OleDb.OleDbException
Conn.Close()
MessageBox.Show("There was an error updating the Database" &
vbCr & vbLf & ex.Message, "Prep Data", MessageBoxButtons.OK,
MessageBoxIcon.Error)
End Try
BTW I can do this by writing each change to the DB as I change it in the
datatable, but this requires me to open & close the connection nearly 1/2
million times (there are over400,000 records in the DB)
Thanks
Gary