Microsoft VBScript 运行时错误 (0x800A01CE) 远程服务器不存在或不可用
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<!-- #include file="fun.asp"-->
<body>
<%
lujing1=request("lujing1")
lujing2=request("lujing2")
lujing3=request("lujing3")
dim strsource(100)
strsource1= server.MapPath("./"&lujing1)
strsource2= server.MapPath("./"&lujing2)
strsource3= server.MapPath("./"&lujing3)
Set Conn = Server.CreateObject("ADODB.Connection")
Providers = "Provider=Microsoft.Jet.OLEDB.4.0;"
DBPath = "Data Source=" & Server.MapPath("ygxx.mdb")
Conn.Open Providers & DBPath
set rs = Server.CreateObject("ADODB.RecordSet")
set xlApp = server.CreateObject("Excel.Application")
set xlbook1 = xlApp.WorkBooks.Open(strsource2)
set xlsheet1 = xlbook1.Worksheets(1)
xlsheet1.Activate
i = 2
while xlsheet1.cells(i,1) <> ""
if(xlsheet1.cells(i,4)=0.0) then
sql1="insert into canfei2(gonghao,canfei,xingming) values('" & xlsheet1.Cells(i,1) &"','"& xlsheet1.Cells(i,4)&"','"& xlsheet1.Cells(i,2)&"')"
conn.execute(sql1)
end if
i = i + 1
wend
set xlsheet1 = nothing
set xlbook1 = nothing
xlApp.quit
response.Redirect("index.asp")
%>
</body>
</html>
初学者 这是什么原因啊 急啊 数据只能导进去一半 ,就提示错误 可能是脚本运行超时了,默认为 90 秒,你试试在头部加入 Server.ScriptTimeOut = 秒数
补充:VB , 基础类