im using vb.net

can u guys help me..

i dont know why error still come...
whats wrong with my coding?

dis my code

Public Sub UpdateMember(ByVal membername As String, ByVal address As String, ByVal handphone As String)

ExecuteSqlCommand("update member set tmembername=" & membername & ", taddress='" & address & "' and handphone='" & handphone & "'")

End Sub

when i running the program
this error will out "No value given for one or more required parameters"

please help me...
im in urgent..


You're missing a comma between the address and handphone arguments in your call.

i already put a comma between address and handphone,but error still come
and this time is "Syntax error in UPDATE statement"

it is anything with my code?


yes, you don't have parameter to update. i mean your key to update. your code its not specify who to update.
you need key :
where KeyName = ???. ex : where IdMember='"123"'
and you loosing to add single quote :

ExecuteSqlCommand("update member set tmembername='" & membername & "', taddress='" & address & "' and handphone='" & handphone & "' Where IdMember = '"???"' " )

hello u guys...

thanks for helping me...

im done now..sorry for the late reply..

thanks again..

This question has already been answered. Start a new discussion instead.