<%
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("..\db\db.mdb")
conn.open()
rs1.open "select * from a",conn,3,3
sql="create table b(ccid integer primary key,"
'创建b表并且设置ccid为主键
while not rs1.eof
sql=sql & rs1("news_id") & " text(100),"
'读取news_id记录作为b表字段,全部按文本处理
rs1.movenext
wend
sql=left(sql,len(sql)-1) & ")"
'去掉最后一个逗号
rs1.close
conn.execute sql
'执行sql语句创建b表
conn.close
%>