asp.net - insert command inserts several rows in table -
i'm using code insert in database , every time inserts more 1 row ,what problem ?
protected sub btnsave_click(byval sender object, byval e system.eventargs) handles btnsave.click dim dob datetime = datetime.parse(request.form(textbox6.uniqueid)) dim constring string = configurationmanager.connectionstrings("sqlexpress").connectionstring using con new system.data.sqlclient.sqlconnection(constring) dim com new sqlcommand("insert main (groupid, name, description, modeud, startnum, startdate, rate) values (" & textbox1.text & ",'" & textbox2.text & "','" & textbox3.text & "'," & me.dropdownlist1.selecteditem.value & "," & textbox4.text & ",'" & dob & "'," & textbox5.text & ")", con) con.open() com.executenonquery() con.close() end using end sub
have checked see if block of code being called more once? 1 quick way put alert box inside can count times runs.
Comments
Post a Comment