d2005
Active member
hi my code shown below, igves an error of an unequal number of arguments, but i count 11 on each. confusing.
1)is there a better way to write insert statement, please give example.
2)please give an example of insert without textbox ie now() for date and time,
thanks in advance.
im only a begginer.
1)is there a better way to write insert statement, please give example.
2)please give an example of insert without textbox ie now() for date and time,
thanks in advance.
im only a begginer.
VB.NET:
Dim sqlInsertuser As New SqlCommand("INSERT INTO tb_user(c_orig_addr,c_user_fname,c_user_sname,c_username_login,c_user_password,c_user_house,c_user_street,c_user_town,c_user_postcode,c_user_tel_alt,c_user_email) VALUES('" & txt_mobile.Text & "','" & txt_fname.Text & "''" & txt_sname.Text & "','" & txt_username.Text & "','" & txt_password.Text & "','" & txt_house.Text & "','" & txt_street.Text & "','" & txt_town.Text & "','" & txt_post.Text & "','" & txt_tel.Text & "','" & txt_email.Text & "');", oSQLConn)
'sqlInsertuser.Connection.Open()
sqlInsertuser.ExecuteNonQuery()
oSQLConn.Close()