no value given...

  • 12 years ago

     hi..
     

    im working with vb.net

    i got a few problem..can u guys help me out...

    1. can u all tell me

    whats wrong with 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 this error msg will out..

    "No value given for one or more required paremeters"

    please help me..im in urgent..

    thanks...
     

  • 12 years ago

     hiii..

    thanks for helping me..but its still got error..

      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

    and error msg is..."Syntax error in UPDATE statements"

    actually i dont know vb.net very well.

    thanks
     

  • 12 years ago

    write like this

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

     


  • 12 years ago

    i can update...

    but...

    all the data in member table also update..let say i have 5 data in table member...

    i want update data no 4..

    but after i press update then all the data becomes like no 4.

    i think i should put WHERE statements rite?
     

  • 12 years ago

     hello u guys...

    thanks for helping me...

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

    thanks again..

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” - Bill Gates