<%Dim cn,aa,oConn,connstr
aa=request.form("file")
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&aa&"; Extended
Properties=Excel 8.0"
connstr="provider=sqloledb;data source=PC-200904031150\TEXT;initial catalog=lingdong;user id=lingdong;password=123456;"
set oConn=server.CreateObject("ADODB.CONNECTION")
oConn.open connstr
Set Rs = cn.Execute("Select * From [Sheet1$]")
If Not Rs.Eof Then
do While Not Rs.Eof
oConn.Execute("Insert Into CRJ(id,name,state) values('"&Rs(0)&"','"&Rs(1)&"','"&Rs(2)&"')")
Rs.movenext
Wend
End If
Rs.Close
Set Rs = Nothing
Response.Write "<script>alert('提示:\n数据导入成功!');location.href='select.asp'</script>"
%>
这个哪里有问题么,测试不通