<script type="text/javascript">
</script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
- ASP实例代码,利用SQL语句动态创建Access表。
- 留作参考,对在线升级数据库有用处.
- 以下为引用的内容:
- <%
- nownowtime = now()
- tablename = cstr(year(nowtime))+"_"+cstr(second(nowtime))
- response.write tablename
- db_path = "test.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
- %>