access|server| Export Data
The approach is simple: you need to nest an access connection in a SQL Server connection, and then
Write to it.
<%set Conn = Server.CreateObject ("ADODB.") Connection ")
Conn.Open "Driver={sql Server};server=mamaco;uid=linner;pwd=123;dat
Abase=linner "
Sql= "SELECT * from Scjh"
Set Rs=conn.execute (SQL)%>
<%set Conn1 = Server.CreateObject ("ADODB.") Connection ")
param = "Driver={microsoft Access driver (*.mdb)}"
Conn. Open param & ";d bq=" & Server.MapPath ("Scjh.mdb")
Conn1.execute ("Delete from Scjh")%>
<%do While not rs.eof%>
<%dim KTDH,SCPH,SCTS,JHQTSJ,YHXDSJ,YXJ,RWBH
Ktdh=rs ("KTDH")
Scph=rs ("SCPH")
Scts=rs ("SCTs")
Jhqtsj=rs ("JHQTSJ")
Yhxdsj=rs ("YHXDSJ")
Yxj=rs ("Yxj")
Rwbh=rs ("RWBH")
%>
<%sql1= "INSERT into SCJH (KTDH,SCPH,SCTS,JHQTSJ,YHXDSJ,YXJ,RWBH) values
(' & KTDH & ', ' & SCPH & ', ' & SCTs & ', ' ' &jhqtsj& ', ' ' &yhxdsj& ', ' ' & '
Yxj & ", & Rwbh &") "
Conn1.execute (SQL1)%>
<%rs.movenext
Loop
Conn1.close
Conn.close%>
<%response.redirect "/download/scjh.mdb"%>