Hi,
I have a small table with two columns: Id and name. But I need to reintialize my Id column anytime I need. I do write this code to see if its can works properly. But after running and click to my button. I receive an error message that say: error syntax in column definition
Anyone can Help please.
- private void button1_Click(object sender, EventArgs e)
- {
- OleDbCommand comm = new OleDbCommand("ALTER TABLE myTable ALTER " + " COLUMN Id AUTOINCREMENT(" + textBox1.Text + ",1)", conn);
- conn.Open();
- comm.ExecuteNonQuery();
- comm.Dispose();
- conn.Close();
- MessageBox.Show("Ok");
- }