数据库连接出错,请检查连接字串。下面是 conn.asp 源码 5
<!--#includefile="inc/config.asp"--><%'**********************************************...
<!-- #include file="inc/config.asp" -->
<%
'****************************************************
'Code for EptimeFFMS
'Vision : v4.0
'****************************************************
%>
<%
if request.Cookies("username")="" then
%>
<script language="javascript">
top.location.href="index.asp"
</script>
<%
response.end
end if
%>
<%
If(databaseType=0) Then
'ACCESS数据库
set conn=server.createobject("adodb.connection")
mypath=server.mappath(""&accessFilePath&"")
conn.open "provider=microsoft.jet.oledb.4.0;data source=" & mypath
ElseIf(databaseType=1) Then
'MSSQL SERVER数据库
Set Conn=Server.CreateObject("Adodb.Connection")
StrConn = "PROVIDER=SQLOLEDB.1;Data Source="&databaseServer&";Initial Catalog="&databaseName&";Persist Security Info=True;User ID="&databaseUser&";Password="&databasePwd&";Connect Timeout=30"
Conn.Open StrConn
Else
'数据库设置错误
Response.Write"数据库设置错误,请联系管理员!"
Response.End
End If
'Response.Write StrConn
%> 展开
<%
'****************************************************
'Code for EptimeFFMS
'Vision : v4.0
'****************************************************
%>
<%
if request.Cookies("username")="" then
%>
<script language="javascript">
top.location.href="index.asp"
</script>
<%
response.end
end if
%>
<%
If(databaseType=0) Then
'ACCESS数据库
set conn=server.createobject("adodb.connection")
mypath=server.mappath(""&accessFilePath&"")
conn.open "provider=microsoft.jet.oledb.4.0;data source=" & mypath
ElseIf(databaseType=1) Then
'MSSQL SERVER数据库
Set Conn=Server.CreateObject("Adodb.Connection")
StrConn = "PROVIDER=SQLOLEDB.1;Data Source="&databaseServer&";Initial Catalog="&databaseName&";Persist Security Info=True;User ID="&databaseUser&";Password="&databasePwd&";Connect Timeout=30"
Conn.Open StrConn
Else
'数据库设置错误
Response.Write"数据库设置错误,请联系管理员!"
Response.End
End If
'Response.Write StrConn
%> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询