Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Software > ADO Data > Saving Data wit...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4215 of 4320
Post > Topic >>

Saving Data with DataAdapter to Jet DB

by =?Utf-8?B?TllXR1VZNTQ=?= <NYWGUY54@[EMAIL PROTECTED] > Apr 18, 2008 at 05:01 PM

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
 




 3 Posts in Topic:
Saving Data with DataAdapter to Jet DB
=?Utf-8?B?TllXR1VZNTQ=?=   2008-04-18 17:01:03 
Re: Saving Data with DataAdapter to Jet DB
"Bob Barrows [MVP]&q  2008-04-18 20:07:19 
Re: Saving Data with DataAdapter to Jet DB
=?Utf-8?B?TllXR1VZNTQ=?=   2008-04-18 17:17:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:48:45 CST 2008.