求教:在已有记录表中用addnew添加记录时为什么只添加到表的前端而不是表的尾部
在已有记录表中用addnew添加记录时为什么只添加到表的前端而不是表的尾部?dim conn
dim connstr
dim sql,bmdd,kddm,school,pwd,flag,image,kdmc
Set conn = Server.CreateObject("ADODB.Connection")
connstr="driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("../data/main.mdb")
conn.Open connstr
set re = server.createobject("adodb.recordset")
sql="select * from main"
re.open sql,conn,1,3
bmddm=re("bmddm")
kddm=re("kddm")
school=re("school")
pwd=left(re("pwd"),5)&right(a1,3)
flag=re("flag")
image="images\"&bmddm&"\"&a1&".jpg"
kdmc=re("kdmc")
if not re.eof then
re.addnew
re("bmddm")=bmddm
re("kddm")=kddm
re("xh")=a1
re("school")=school
re("pwd")=pwd
re("image")=image
re("flag")=flag
re("kdmc")=kdmc
re.update
end if