Access Stored Procedures

G

Guest

I'm trying to update my access database through an oledb data adapter that
calls an access update stored procedure on my dataset. I realized that only
the first row modified gets updated in the database. All other rows remain
unchanged. Does anyone know why this is so and how I can fix it to update
all changed records?

Parveen
 
W

William Ryan eMVP

Parveen:

Before you call your update, have you verified the number of rows that have
been marked as Modified/Deleted/Inserted etc? I know this is obvious but
it's usually the first place to look. Next I'd make sure
ContinueUpdateOnError isn't set to true b/c this could be masking a problem
that with the update command. Next I'd look to the update command and make
sure nothing in it is causing the problem.

HTH,

Bill
 
G

Guest

Thanks for your reply....I verified the state of the updated rows..
this is working fine....update command is also working fine...
any other suggestions?

Parvee
 
G

Guest

Yes I tried that as well....still doesn't work....what I noticed is that the
number of rows updated is correct...but the value in the second row
doesn't changed to the new value. I'm so lost!!!

Parveen
 
G

Guest

So basically, if I update one record, the change shows up in the database.
But more than one record updates don't show up. Does anyone know
why?

Parveen
 
G

Guest

Also, everything works fine if I set the command text equal to the UPDATE sql statement
that my stored procedure uses. It only acts weird when I used a stored procedure....
 
W

William Ryan eMVP

If the number of rows updated in the DB matches what you expect, that's
definitely weird. If the exact same code works, but when you use a Proc it
only updates one, I'm stumped. I'd think it would be either 1) lack of
permissions 2) the commandtype...but if one row is updated, then neither of
those could be the situation.

But the records affected definitely comes back correctly? I know this is a
long shot, are you using a test and production database? I could see a case
where you were updating the test db then checking the production db, but
even that wouldn't explain the first record changing. every thing I can
think of that I've ever seen is negated if one record is being changed. I
was thinking permissons on the file..but that wouldn't be it and now that I
think about it, I don't think you can set execute permissions on access
stored procs so I was silly to mention it.

can you post the code? I'll try to replicate it but I'm stumped.

Sorry about that, but if you can get me the code, I'll run it and see if I
can replicate it.

Bill
 

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