0

hi

how do i update multiple rows? right now i can only update one row.
it works like this now:
user keys in customerIdNo and pwd1. a match in database will display pwd1 in textbox. textbox is databind to password field in access database. user can change the displayed pwd1 to pwd2 or to other pwd. when update button is pressed it updates the password field and changes pwd1 to what the user has changed.

BUT only a row is updated. i've a few rows where the password field values are pwd1. i want all pwd1 to be changed to the pwd that the user has changed to.

i use dataadapter and dataset. in dataadapter i wrote select* from table1 where customerIdNo=? and password=?

please help.
thank you!

3
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by v_ashwani
0

I don't understand what you are trying to do. Do you have multiple passwords for the same CustomerIDNo? or do you store the customers password in multiple places?

0

if i am understanding right, you want to update the passwords for all the accounts that have userid as customerid1. If that is the case, then simple Update query woiuld do it.
Like following:
Update table1
set password= 'pwd2'
where customerIdNo = 'customerid1'

and after the query just do dataadapter.AcceptChanges();

Hope this helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.