Data Adapter update

G

Guest

I have a connection to an iSeries table that I pull a customer number, name,
and status into a dataset. I have two data grids on the form one has the
dataset from the iSeries as its source and the other has the dataset from the
Access database table as it's source. The Access table only has the fields
that are in the iSeries dataset. The connections, data adapter, and datasets
were all created through the designer. I have tried to merge the two datasets
and then call the update of the access data adapter and I have tried just
using the fill method on both datasets from the iSeries data adapter. The
data grids show identical information correctly but the table will not
update. The table name is CUMA8 on both the iSeries and the Access database.
The filed names are identical. The code is simple:

cnCustomer.Open()
daCustomer.Fill(dsUrmCustomer)
daCustomer.Fill(dsAccessTagType)
cnAccessTagType.Open()
daAccessTagType.Update(dsAccessTagType)
cnCustomer.Close()
cnAccessTagType.Close()

I know this should be easy but I can't seem to make it work.
 
M

Marina

Sorry, what is there to update, when no changes have been made to the
dataset?

The rows are all still exactly as they were retrieved. And thus they all
have a row state of Unmodified.
 
C

Cor Ligthert [MVP]

Scott,

I agree with Marina, however probably are you missing this commands on one
of the two tables and the key on both (and than you have to merge).

da.AcceptChangesDuringFill = False
da.MissingSchemaAction = MissingSchemaAction.AddWithKey

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top