TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
701
1.3k
217.2k
Reinitialize the Id column
Mar 27 2018 11:03 AM
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"
);
}
Reply
Answers (
3
)
how does session work in website if 100 user login in a time
Duplicating data in crystal report with MySQL and C#