Free Tutorials
What is the format of date,, because i insert any date it shows 1-jan-00,like i wrote 25-mar-2008,, it shows 1-jan-00.
Emmu ,,error at this linecmd.ExecuteNonQuery()i show u whole program con = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=D:\khan\khan's work\Visual studio\Vote Casting\CastVote\CastVote\App_Data\Database1.mdf;Integrated Security=True;User Instance=True") con.Open() cmd = New SqlCommand("insert into voter values(" + TextBox1.Text + ",'" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "')", con) cmd.ExecuteNonQuery() Label1.Text = ("Record inserted") TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" TextBox6.Text = "" con.Close()
Emmu,, Its a mistake i mean error because of date. how to handel it
my id is set to primary and auto increment. when I enter an id it says i can't, when i don't it says it can't be a stringhow do you handle id fields
I didnt get you ...
please tell me how can i create a database table on single button click event
please tell me how can i create a simple forum.
I am having the same error ---cmd.ExecuteNonQuery()It says Incorrect syntax error'('. 'Delivery' is not recognized SET option.Please help...
What is the format of date,, because i insert any date it shows 1-jan-00,like i wrote 25-mar-2008,, it shows 1-jan-00.
ReplyDeleteEmmu ,,error at this line
ReplyDeletecmd.ExecuteNonQuery()
i show u whole program
con = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=D:\khan\khan's work\Visual studio\Vote Casting\CastVote\CastVote\App_Data\Database1.mdf;Integrated Security=True;User Instance=True")
con.Open()
cmd = New SqlCommand("insert into voter values(" + TextBox1.Text + ",'" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "')", con)
cmd.ExecuteNonQuery()
Label1.Text = ("Record inserted")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
con.Close()
Emmu,, Its a mistake i mean error because of date. how to handel it
ReplyDeletemy id is set to primary and auto increment. when I enter an id it says i can't, when i don't it says it can't be a string
ReplyDeletehow do you handle id fields
I didnt get you ...
ReplyDeleteplease tell me how can i create a database table on single button click event
ReplyDeleteplease tell me how can i create a simple forum.
ReplyDeleteI am having the same error ---
ReplyDeletecmd.ExecuteNonQuery()
It says Incorrect syntax error'('. 'Delivery' is not recognized SET option.
Please help...