المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to update mutliple columns with ado to a database?



C# Programming
04-14-2009, 05:41 AM
Hi,

i getting started with ado and how been sucessful so far, however im now trying to update the data when editing a record, however i can only find how to do this with one set of data involving one column not mulitple.

e.g.

update Patient set Lastname = '" + textBox2.Text + "' where patientunitno = '" + textBox1.Text + "'";

my question is probley rather simple to solve but i cant find anything on google. I must be trying the wrong type of key words in.

I did find however one article linked below

http://www.xtremedotnettalk.com/showthread.php?t=95074[^ (http://www.xtremedotnettalk.com/showthread.php?t=95074)]

however im not sure if this is the most practical way? any help to point me in the right direction would be great


Many Thanxs

D.Arnold

dave1816