Microsoft vb-script 编译器错误 错误 '800a03f6' ,不知问题在哪里
fxbb 2004-11-06 02:07:45 我在实验室环境下测试我做的程序没有问题,但是拿到别人服务器上就是有问题。我实现的是利用FSO在服务器端生成一个EXCEL文件然后下载到客户端,为什么会出现这个问题呢?
Microsoft vb-script 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft vb-script 运行时错误 错误 '800a0046'
没有权限
/hkxtweb/2excel1.asp,行13
主要出错代码如下:
<%@ LANGUAGE="VBSCRIPT" %>
<%option explicit%>
<%
dim rs,sql,filename,fs,myfile,x,link,conn,DSNtemp,table,f,intFilelength,s
Set conn = Server.CreateObject("ADODB.Connection")
DSNtemp="driver={SQL Server};database=QHSy;server=localhost;uid=sa;pwd=sa"
conn.open DSNtemp
Set fs = server.CreateObject("scripting.filesystemobject")
filename = Server.MapPath("/")+"\\online.xls"
if fs.FileExists(filename) then
fs.DeleteFile(filename)
end if
set myfile = fs.CreateTextFile(filename,true)//我猜测主要是这句有问题
Set rs = Server.CreateObject("ADODB.Recordset")
sql = unescape(request.querystring("sql"))
table = request.querystring("title")
rs.open sql,conn,1,1
if rs.EOF and rs.BOF then