conn.asp问题

来源:百度知道 编辑:UC知道 时间:2024/06/19 17:58:20
我想整合一下网站。一个是pjblog 一个是朋友写的代码也是程序。
我主要是想用pjblog。 但是问题就是出在conn.asp
我用conn.asp哪个都不行!

现在比较急!希望高手指点。
代码如下:
<%
'***************PJblog2 连接数据库*******************
' PJblog2 Copyright 2005
' Update:2005-9-2
'***************************************************

'IF Not IsObject(Application(CookieName&"_blog_Conn")) Then
on error resume next
Set Conn= Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(AccessFile)
Conn.Open
If Err Then
err.Clear
Set Conn = Nothing
Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=UTF-8"" /><div style='font-size:12px;font-weight:bold;border:1px solid #006;padding:6px;background:#fcc'>数据库连接出错,请检查连接字串!</div&g

无解。。自学`

用我的试试
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'Option Explicit
Response.Buffer = True
Server.ScriptTimeOut = 90
Session.CodePage=65001
'定义数据库连接
on error resume next
Dim Conn
Dim ConnStr
ConnStr="Provider=SQLOLEDB;Persist Security Info=True;User ID=sa;Pwd=windows;Initial Catalog=data1;Data Source=127.0.0.1"
Set Conn= Server.CreateObject("ADODB.Connection")
Conn.ConnectionString="Provider=SQLOLEDB;Persist Security Info=True;User ID=sa;Pwd=000000;Initial Catalog=ACCP_ASP;Data Source=127.0.0.1"
Conn.Open
If Err Then
err.Clear
Set Conn = Nothing
Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" />数据库连接出错,请检查连接字串。")
Response.End
End If
%>
<%
'查找总信息
dim rrrs