The method is actually very simple: you need to nest an access connection in the SQL server connection, and then one by one
Write.
<% Set conn = server. Createobject ("ADODB. Connection ")
Conn. Open "driver = {SQL Server}; server = mamaco; uid = linner; Pwd = 123; dat
Abase = linner"
SQL = "select * From scloud"
Set rsw.conn.exe cute (SQL) %>
<% Set conn1 = server. Createobject ("ADODB. Connection ")
Param = "driver = {Microsoft Access Driver (*. mdb )}"
Conn. Open Param & "; DBQ =" & server. mappath ("scloud. mdb ")
Conn1.execute ("delete from scloud") %>
<% 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 scloud (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/scloud. mdb" %>