下面代码是一个最简单的利用ASP创建ACCESS表的示例代码,创建的ID编号为自动编号。
<%
dim conn
dim dbpath
set conn=server.createobject("adodb.connection")
dbpath=Server.mappath("data/data.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & dbpath
dmlSql="Create table Table1 (id autoincrement(1,1) primary key, zhengshu int, wenzi text) "
conn.execute (dmlSql) '执行SQL,建表
%>