<%
sub create
on error resume next
nowtime = now()
tablename = cstr(year(nowtime))
response.write tablename
db_path = "data/leaveword_data.mdb"
Set conn= Server.CreateObject("ADODB.Connection")
connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(db_path)
conn.Open connstr
Set rs = Server.CreateObject ("ADODB.Recordset")
sql = "create table "& tablename &" (id integer primary key,name text,Birthday datetime)"
rs.Open sql,conn,2,3
if err then
response.write "已经存在!"
end if
end sub
create
%>