sql server - How to update data from textbox to SQL? -
private sub button1_click(sender object, e eventargs) handles button1.click cn.open() try cmd.commandtext = "update patient_detail set (name ='" & textboxname.text & "',age = '" & textboxage.text & "',sex = '" & textboxsex.text & "',address = '" & textboxaddress.text & "',check_in = '" & textboxchin.text & "',check_in_illness = '" & textboxchinl.text & "',sevice = '" & textboxservice.text & "',check_out_illness = '" & textboxchoutl.text & "',check_out = '" & textboxchout.text & "',transfer = '" & textboxtransfer.text & "',patient_result = '" & comboboxptr.text & "') id = '" & textboxid.text & "' " cmd.executenonquery() catch ex exception messagebox.show(ex.message) end try cn.close() end sub end class
Comments
Post a Comment