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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -