vb.net - Incorrect syntax near '4' -
i have insert code variable s = 4. help pretty appreciated.
con.open() dim cmd new sqlcommand("insert employee values('" & txtfname.text & "','" & txtmi.text & "','" & txtlname.text & "','" & txtssn.text & "','" & txtbdate.text & "','" & txtaddress.text & "','" & cmbsex.text.toupper & "','" & txtsalary.text & "','" & dbnull.value & "','" & s & "'", con) dim cmd1 new sqlcommand("insert depndent values('" & txtessn.text & "','" & txtdepname.text & "','" & cmbdsex.text.toupper & "','" & txtdbdate.text & "','" & txtrelationship.text & "'", con) cmd.executenonquery() cmd1.executenonquery() cleartxt() con.close()
you forgot closing )
...l.value & "','" & s & "')", con)
vb.net syntax insert
No comments:
Post a Comment