syntax Error..

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2008
Posts: 24
Reputation: _::suhanna::_ is an unknown quantity at this point 
Solved Threads: 0
_::suhanna::_ _::suhanna::_ is offline Offline
Newbie Poster

syntax Error..

 
0
  #1
Mar 18th, 2008
hi..
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..


thanks.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,740
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 739
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: syntax Error..

 
0
  #2
Mar 18th, 2008
You're missing a comma between the address and handphone arguments in your call.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 24
Reputation: _::suhanna::_ is an unknown quantity at this point 
Solved Threads: 0
_::suhanna::_ _::suhanna::_ is offline Offline
Newbie Poster

Re: syntax Error..

 
0
  #3
Mar 18th, 2008
Originally Posted by Narue View Post
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?

thanks..
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: syntax Error..

 
0
  #4
Mar 19th, 2008
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 = '"???"' " )
Last edited by Jx_Man; Mar 19th, 2008 at 2:01 am. Reason: add code
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 24
Reputation: _::suhanna::_ is an unknown quantity at this point 
Solved Threads: 0
_::suhanna::_ _::suhanna::_ is offline Offline
Newbie Poster

Re: syntax Error..

 
0
  #5
Mar 20th, 2008
hello u guys...

thanks for helping me...

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

thanks again..
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC