| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1113 人关注过本帖
标题:[求助]Active Server Pages 错误 'ASP 0141'
只看楼主 加入收藏
cater
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-2-26
收藏
 问题点数:0 回复次数:2 
[求助]Active Server Pages 错误 'ASP 0141'

错误提示:

Active Server Pages 错误 'ASP 0141'

Page 命令重复

/bbs/conn.asp,行1

@ 命令只可以在 Active Server Page

原代码:

<%@LANGUAGE = VBScript CodePage = 936%>
<%
Option Explicit
Response.Buffer = True
Dim Startime
Dim SqlNowString,Dvbbs,template,MyBoardOnline
Dim Conn,Plus_Conn,Db,MyDbPath
Startime = Timer()
'可修改设置一:========================定义数据库类别,1为SQL数据库,0为Access数据库=============================
Const IsSqlDataBase = 0
MyDbPath = ""
'================================================================================================================
If IsSqlDataBase = 1 Then
'必修改设置二:========================SQL数据库设置=============================================================
'sql数据库连接参数:数据库名(SqlDatabaseName)、用户密码(SqlPassword)、用户名(SqlUsername)、
'连接名(SqlLocalName)(本地用local,外地用IP)
Const SqlDatabaseName = "dvbbs7"
Const SqlPassword = "dvbbs7"
Const SqlUsername = "dvbbs7"
Const SqlLocalName = "(local)"
'================================================================================================================
SqlNowString = "GetDate()"
Else
'必修改设置三:========================Access数据库设置==========================================================
'免费用户第一次使用请修改本处数据库地址并相应修改data目录中数据库名称,如:将dvbbs6.mdb修改为dvbbs6.asp
Db = "data/dvbbs7.mdb"
'================================================================================================================
SqlNowString = "Now()"
End If
Const IsDeBug = 1
Set Dvbbs = New Cls_Forum
Set template = New cls_templates
Sub ConnectionDatabase
Dim ConnStr
If IsSqlDataBase = 1 Then
ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
Else
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(MyDbPath & db)
End If
On Error Resume Next
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnStr
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "数据库连接出错,请检查连接字串。"'注释,需要把这几个字翻译成英文。
Response.End
End If
End Sub
'-----------------------------------------------------------------------------------------------------
'独立道具库连接设置
Sub Plus_ConnectionDatabase
Dim ConnStr
If IsSqlDataBase = 1 Then
'sql数据库连接参数:数据库名、用户密码、用户名、连接名(本地用local,外地用IP)
Dim SqlDatabaseName,SqlPassword,SqlUsername,SqlLocalName
SqlDatabaseName = "dvbbs7"
SqlPassword = "dvbbs"
SqlUsername = "dvbbs"
SqlLocalName = "(local)"
ConnStr = "Provider = Sqloledb; User ID = " & SqlUsername & "; Password = " & SqlPassword & "; Initial Catalog = " & SqlDatabaseName & "; Data Source = " & SqlLocalName & ";"
Else
Dim Db
'免费用户第一次使用请修改本处数据库地址并相应修改data目录中数据库名称,如将dvbbs6.mdb修改为dvbbs6.asp
Db = MyDbPath & "data/Dv_Plus_Tools.mdb"
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath(db)
End If
On Error Resume Next
Set Plus_Conn = Server.CreateObject("ADODB.Connection")
Plus_Conn.open ConnStr
If Err Then
err.Clear
Set Plus_Conn = Nothing
Response.Write "插件数据库连接出错,请检查连接字串。"'注释,需要把这几个字翻译成英文。
Response.End
End If
End Sub
'-----------------------------------------------------------------------------------------------------
%>

搜索更多相关主题的帖子: Active Server Pages face 
2006-02-26 21:35
cater
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-2-26
收藏
得分:0 

急啊~帮帮忙啊~

2006-02-26 21:49
阳光白雪
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:39
帖 子:2220
专家分:0
注 册:2005-11-18
收藏
得分:0 
错误提示很清楚了,<%@LANGUAGE = VBScript CodePage = 936%>
在同一页中只能使用一次,看看你的包含文件中是否有<%@LANGUAGE = VBScript CodePage = 936%>

[此贴子已经被作者于2006-2-27 8:52:40编辑过]


专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
2006-02-27 08:52
快速回复:[求助]Active Server Pages 错误 'ASP 0141'
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021841 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved