<%
on error resume nextdim conn1,conn2,sql1,sql2,rs1,rs2
Set Conn1=Server.CreateObject("ADODB.Connection")   
Conn1.Open "Driver={Microsoft Excel Driver (*.xls)};DBQ="&server.mappath("info.xls")  
set rs1=server.CreateObject("ADODB.Recordset")
sql1="select * from [sheet1$]"
rs1.open sql1,conn1Set Conn2=Server.CreateObject("ADODB.Connection")   
Conn2.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="&server.mappath("info.mdb")  
set rs2=server.CreateObject("ADODB.Recordset")
sql2="select * from sa"
rs2.open sql2,conn2,1,3do while not rs1.eof
 rs2.addnew
 rs2(0)=rs1(0)
 rs2(1)=rs1(1)
 rs2.update
 rs1.movenext
loopif oct(err.number)=20001007041 or err.number=0 then
 response.write("导入数据成功")
end if   
%>