how to update tablein vb.net windows app

Posted by Shanky11 under VB.NET on 3/4/2013 | Points: 10 | Views : 2492 | Status : [Member] | Replies : 4
i have a table registration
column
userid
username
lastname
mobile
emailid
from a form through txtboxes i need to update this
how can i write coding of it
i writting this c0de is this ok?????????????????
"update registration set username='" + txtuserNameEdit.Text + "',lastname='" + txtLastName.Text + "',Mobile=" + txtMobile.Text + ",emailID='" + txtEmailID.Text + "' where ", sqlcon)




Responses

Posted by: Santhi on: 3/4/2013 [Member] Starter | Points: 25

Up
0
Down

Hi

What you have written is correct.

Thanks & Regards,
Santhi .V

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shanky11 on: 3/4/2013 [Member] Starter | Points: 25

Up
0
Down
hi Santhi
but what about where condition
what i have to write in it

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Santhi on: 3/4/2013 [Member] Starter | Points: 25

Up
0
Down
Hi

Pass the userid in the where condition.

Thanks & Regards,
Santhi .V

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shanky11 on: 3/5/2013 [Member] Starter | Points: 25

Up
0
Down
hello satapriyank
it showing error ....................
must declare scalar variable
and one more thing i.e......
in where conditon u only declare @userid from where this value will come

Shanky11, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response