1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

update table doesn't work

Discussion in 'C#' started by bhuppi890109, Apr 10, 2011.

  1. #1
    hi friends . i am facing a problem while updating a table in asp.net.
    i am creating a page for change password and i used the update query on click of a button to change the password but it doesn't work. i dont know why ..my query is
    update table set column='"+textbox.text+"';
    SEMrush
     
    bhuppi890109, Apr 10, 2011 IP
    SEMrush
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,681
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Would question why your not using either the default or an alternative security/ membership provider rather than trying to create your own thing. Providing more of the code would also help.

    Assuming your using an SQLCommand to do the updating in an onclick event you really should have it similar to:
    
    SqlCommand.CommandText = "UPDATE tableID SET columnID = @Parameter";
    SqlCommand.Parameters.Add("@Parameter", SqlDbType.VarChar).Value = Textbox1.Text;
    
    Code (markup):
     
    AstarothSolutions, Apr 11, 2011 IP