后台添加的文章怎样修改ID
后台已经发过100篇文章,我把它们全部删除了,重新增加文章
为什么ID号是从101开始编的
怎样让ID号重新从1开始编号
------解决方案--------------------重置自增长列
http://www.programbbs.com/doc/5491.htm
http://apps.hi.baidu.com/share/detail/19492217
------解决方案--------------------set rs=server.CreateObject("adodb.recordset")
set targetconn=server.CreateObject("adodb.connection")
targetconn.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath("db/db1.mdb")
targetconn.execute("delete * from admingroupinf")
targetconn.execute("drop index id on admingroupinf") '删除索引
targetconn.execute("alter table admingroupinf drop column id") '删除列
targetconn.execute("alter table admingroupinf add column id autoincrement(0,1)") '这句的(0,1)是关键
targetconn.execute("create index id on admingroupinf(id)") '重新创建索引
targetconn.close