日期:2014-05-17  浏览次数:21245 次

我第一次打开的时候,可以打开,现在却出现错误!为什么呢?
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]常见错误 不能打开注册表关键字 'Temporary (volatile) Jet DSN for process 0x8e4 Thread 0xf84 DBC 0x1851f0c Jet'。
/admin_admin/sys_conn.asp, 第 4 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) 

网页:
POST 49 ??? /admin_admin/sys_check_login.asp

POST Data:
uid=admin&pwd=admin&imageField.x=0&imageField.y=0 
VBScript code
<%
  connstr="DBQ="+server.mappath("data/#saiyi_system#.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
  set conn=server.createobject("ADODB.CONNECTION")
  conn.open connstr 
  
Dim WebName,webcopyright,webaddress,webtel,websupport
set rs=server.createobject("adodb.recordset")
sql="select * from sys_company order by id desc"
rs.open sql,conn,3,3
WebName = rs("company")
Webcopyright = rs("copyright")
Webaddress = rs("address")
Webtel = rs("tel")
Websupport = rs("support")

function nosql(str)
if not isnull(str) then
str=trim(str)
str=replace(str,";","&#59;")        '分号
str=replace(str,"'","&#39;")        '单引号
str=replace(str,"""","&quot;")        '双引号
str=replace(str,"chr(9)","&nbsp;")    '空格
str=replace(str,"chr(10)","<br>")    '回车
str=replace(str,"chr(13)","<br>")    '回车
str=replace(str,"chr(32)","&nbsp;")    '空格
str=replace(str,"chr(34)","&quot;")    '双引号
str=replace(str,"chr(39)","&#39;")    '单引号
str=Replace(str, "script", "&#115cript")'jscript
str=replace(str,"<","&lt;")            '左<
str=replace(str,">","&gt;")            '右>
str=replace(str,"(","&#40;")            '左(
str=replace(str,")","&#41;")            '右)
str=replace(str,"--","&#45;&#45;")    'SQL注释符
nosql=str
end if
end function
%>




------解决方案--------------------
数据库连接和记录集用完后要及时关闭并设为Nothing
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing