通过实例介绍了asp创建sqlserver 或者access表.和删除表
<%
set conn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
'连接MS Server
connstr="provider=SQLOLEDB;Server=ServerName;database=DbName;user id=sa;password=pwd"
'连接MS Access
'connstr="driver={microsoft access driver (*.mdb)};dbq=" & server.mappath("mydata.mdb")
conn.open connstr
'创建表test
sql="create table Test (user_name char(20) null,user_pwd char(20) null)"
rs.open sql,conn,3,3
'插入数据
sql="insert into Test values('myname','mypwd')"
rs.open sql,conn,3,3
'删除表test
sql="drop table Test"
rs.open sql,conn,3,3
%>
更多信息请查看IT技术专栏