加入收藏 | 设为首页 | 会员中心 | 我要投稿 云计算网_泰州站长网 (http://www.0523zz.com/)- 视觉智能、AI应用、CDN、行业物联网、智能数字人!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

用sql语句动态的创建access表 - ASP教程

发布时间:2016-01-13 10:21:15 所属栏目:Asp教程 来源:网络整理
导读:用sql语句动态的创建access表的代如下! % nowtime = now() tablename = cstr(year(nowtime))+_+cstr(second(nowtime)) response.write tablename db_path = te
用sql语句动态的创建access表的代如下!

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

(编辑:云计算网_泰州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读