您的位置: bluesailor散记——
« 3元购买CN域名,3元cn域名注册一段判断数据库值是否为空的ASP函数 »

用asp+sql语句动态的创建access表

分类: 开发文档 发布: bluesailor 浏览: 日期: 2007年3月26日

<%
 nowtime = 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
%>

留作参考,对在线升级数据库有用处.

相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Powered By Z-Blog 1.8 Spirit Build 80722

Copyright Lunji.com Some Rights Reserved.