是的,提示Cls_vbsPage.asp 行164 有问题,整个代码如下:

Class Cls_vbsPage

Private oConn        '连接对象

Private iPagesize    '每页记录数

Private sPageName    '地址栏页数参数名

Private sDbType

'数据库类型,AC为access,MSSQL为SQL SERVER2000存储过程版,MYSQL为mysql,PGSQL为PostGreSql

Private iRecType    '记录总数(>0为另外取值再赋予或者固定值,0执行count设置存cookies,-1执行count不设置cookies)

Private sJsUrl        'Cls_jsPage.js的路径

Private sField        '字段名

Private sTable        '表名

Private sCondition    '条件,不需要where

Private sOrderBy    '排序,不需要order by,需要asc或者desc

Private sPkey        '主键,必写

Private iRecCount

'================================================================

' Class_Initialize 类的初始化

'================================================================

Private Sub Class_Initialize

iPageSize=10

sPageName="Page"

sDbType="AC"

iRecType=0

sJsUrl=""

sField=" * "

End Sub

'================================================================

' Conn 得到数据库连接对象

'================================================================

Public Property Set Conn(ByRef Value)

Set oConn=Value

End Property

'================================================================

' PageSize 设置每一页记录条数,默认10记录

'================================================================

Public Property Let PageSize(ByVal intPageSize)

iPageSize=CheckNum(intPageSize,0,0,iPageSize,0)

End Property

'================================================================

' PageName 地址栏页数参数名

'================================================================

Public Property Let PageName(ByVal strPageName)

sPageName=IIf(Len(strPageName)<1,sPageName,strPageName)

End Property

'================================================================

' DbType 得到数据库类型

'================================================================

Public Property Let DbType(ByVal strDbType)

sDbType=UCase(IIf(Len(strDbType)<1,sDbType,strDbType))

End Property

'================================================================

' RecType 取记录总数(>0为赋值或者固定值,0执行count设置存cookies,-1执行count不设置cookies适用于搜索)

'================================================================

Public Property Let RecType(ByVal intRecType)

iRecType=CheckNum(intRecType,0,0,iRecType,0)

End Property

'================================================================

' JsUrl 取得Cls_jsPage.js的路径

'================================================================

Public Property Let JsUrl(ByVal strJsUrl)

sJsUrl=strJsUrl

End Property

'================================================================

' Pkey 取得主键

'================================================================

Public Property Let Pkey(ByVal strPkey)

sPkey=strPkey

End Property

'================================================================

' Field 取得字段名

'================================================================

Public Property Let Field(ByVal strField)

sField=IIf(Len(strField)<1,sField,strField)

End Property

'================================================================

' Table 取得表名

'================================================================

Public Property Let Table(ByVal strTable)

sTable=strTable

End Property

'================================================================

' Condition 取得条件

'================================================================

Public Property Let Condition(ByVal strCondition)

s=strCondition

sCondition=IIf(Len(s)>2," WHERE "&s,"")

End Property

'================================================================

' OrderBy 取得排序

'================================================================

Public Property Let OrderBy(ByVal strOrderBy)

s=strOrderBy

sOrderBy=IIf(Len(s)>4," ORDER BY "&s,"")

End Property

'================================================================

' RecCount 修正记录总数

'================================================================

Public Property Get RecCount()

If iRecType>0 Then

i=iRecType

Elseif iRecType=0 Then

i=CheckNum(Request.Cookies("ShowoPage")(sPageName),1,0,0,0)

s=Trim(Request.Cookies("ShowoPage")("sCond"))

IF i=0 OR sCondition<>s Then

i=oConn.Execute("SELECT COUNT("&sPkey&") FROM "&sTable&" "&sCondition,0,1)(0)

Response.Cookies("ShowoPage")(sPageName)=i

Response.Cookies("ShowoPage")("sCond")=sCondition

End If

Else

i=oConn.Execute("SELECT COUNT("&sPkey&") FROM "&sTable&" "&sCondition,0,1)(0)

End If

iRecCount=i

RecCount=i

End Property

'================================================================

' ResultSet 返回分页后的记录集

'================================================================

Public Property Get ResultSet()

s=Null

'记录总数

i=iRecCount

'当前页

If i>0 Then

iPageCount=Abs(Int(-Abs(i/iPageSize)))'页数

iPageCurr=CheckNum(Request.QueryString(sPageName),1,1,1,iPageCount)'当前页

Select Case sDbType

Case "MSSQL" 'sqlserver2000数据库存储过程版

Set Rs=server.CreateObject("Adodb.RecordSet")

Set Cm=Server.CreateObject("Adodb.Command")

Cm.CommandType=4

Cm.ActiveConnection=oConn

Cm.CommandText="sp_Util_Page"

Cm.parameters(1)=i

Cm.parameters(2)=iPageCurr

Cm.parameters(3)=iPageSize

Cm.parameters(4)=sPkey

Cm.parameters(5)=sField

Cm.parameters(6)=sTable

Cm.parameters(7)=Replace(sCondition," WHERE ","")

Cm.parameters(8)=Replace(sOrderBy," ORDER BY ","")

Rs.CursorLocation=3

Rs.LockType=1

Rs.Open Cm

Case "MYSQL" 'MYSQL数据库

ResultSet_Sql="SELECT "&sField&" FROM "&sTable&" "&sCondition&" "&sOrderBy&" LIMIT "&(iPageCurr-1)*iPageSize&","&iPageSize

Set Rs=oConn.Execute(ResultSet_Sql)

Case Else '其他情况按最原始的方法处理(AC同理)

Set Rs = Server.CreateObject ("Adodb.RecordSet")

ResultSet_Sql="SELECT "&sField&" FROM "&sTable&" "&sCondition&" "&sOrderBy

Rs.Open ResultSet_Sql,oConn,1,1,&H0001

Rs.AbsolutePosition=(iPageCurr-1)*iPageSize+1

End Select

s=Rs.GetRows(iPageSize)

Rs.close

Set Rs=Nothing

End If

ResultSet=s

End Property

'================================================================

' Class_Terminate 类注销

'================================================================

Private Sub Class_Terminate()

If IsObject(oConn) Then oConn.Close:Set oConn=Nothing

End Sub

'================================================================

' 输入:检查字符,是否有最小值,是否有最大值,最小值(默认数字),最大值

'================================================================

Private Function CheckNum(ByVal strStr,ByVal blnMin,ByVal blnMax,ByVal intMin,ByVal intMax)

Dim i,s,iMi,iMa

s=Left(Trim(""&strStr),32):iMi=intMin:iMa=intMax

If IsNumeric(s) Then

i=CDbl(s)

i=IIf(blnMin=1 And i

i=IIf(blnMax=1 And i>iMa,iMa,i)

Else

i=iMi

End If

CheckNum=i

End Function

'================================================================

' 输入:简化条件判断

'================================================================

Private Function IIf(ByVal blnBool,ByVal strStr1,ByVal strStr2)

Dim s

If blnBool Then

s=strStr1

Else

s=strStr2

End If

IIf=s

End Function

'================================================================

' 上下页部分

'================================================================

Public Sub ShowPage()%>

var s= new Cls_jsPage(,,3,"s");

s.setPageSE("=","");

s.setPageInput("");

s.setUrl("");

s.setPageFrist("首页","首页");

s.setPagePrev("上页","上页");

s.setPageNext("下页","下页");

s.setPageLast("尾页","尾页");

s.setPageText("[{$PageNum}]","第{$PageNum}页");

s.setPageTextF(" {$PageTextF} "," {$PageTextF} ");

s.setPageSelect("{$PageNum}","第{$PageNum}页");

s.setPageCss("","","");

s.setHtml("共{$RecCount}记录 页次{$Page}/{$PageCount} 每页{$PageSize}条 {$PageFrist} {$PagePrev} {$PageText} {$PageNext} {$PageLast} {$PageInput} {$PageSelect}");

s.Write();

End Class%>

以上是asp分页程序,改页其他页面引用一切正常,唯独Plist.asp引用就出错,以下为Plist.asp代码

项目管理

window.name = "win";

Dim itemname,rootid

rootid=trim(request("rootid"))

itemname=Trim(request("itemname"))

If itemname<>"" Then itemname=Replace(itemname,"'","")

if rootid="" then rootid=0

%>

所属项目:

Dim rs,sql

sql = "select * from Sk_Product where rootid=0 order by sorder asc,id asc"

Set rs = conn.execute(sql,0,1)

If Not rs.eof Then

While Not rs.eof

response.write "

If cint(rs(0))=cint(rootid) Then

response.write "selected"

End If

response.write ">"&rs(1)&"

"

rs.movenext

Wend

End If

rs.close

Set rs=Nothing

%>

项目名称:

/>

项目名称 报价 说明

Dim ors,scon

scon = " 1=1 "

If itemname<>"" Then scon = scon & " and itemname like '%"&itemname&"%' "

if rootid<>0 then scon = scon & " and (id="&rootid&" or rootid="&rootid&") "

Set ors=new Cls_vbsPage    '创建对象

Set ors.Conn=conn        '得到数据库连接对象

With ors

.PageSize=10        '每页记录条数

.PageName="Page"    'cookies名称

.DbType="AC"

.RecType=-1

.JsUrl="Script/"

.Pkey="id"

.Field="[id],[itemname],[price],[intro],[rootid]"

.Table="Sk_Product"

.Condition=scon

.OrderBy="IIF(rootid=0,id,rootid),rootid"

End With

iRecCount=ors.RecCount()'记录总数

iRs=ors.ResultSet()        '返回ResultSet

If  iRecCount<1 Then

%>

没有找到相关记录

Set iRs=nothing

else

For i=0 To Ubound(iRs,2)

%>

" onMouseOver="this.style.background='#EAF3FF'" onMouseOut="this.style.background='#FFF'"

0 then response.write "οnclick=""selectitem("&iRs(0,i)&")"""%>>

0 then%>

0 then%>

Next

Set iRs=nothing

End If

conn.close

set conn=nothing

%>

/>

var _a = document.getElementsByTagName("a");

for(i=0;i<_a.length>

_a[i].target = "win";

}

function selectitem(id){

var _id = document.getElementsByName("id");

for(i=0;i<_id.length>

if(_id[i].value==id){

_id[i].checked = true;

}else{

_id[i].checked = false;

}

}

}

document.getElementById("select").οnclick=function(){

var n = 0;

var id = 0;

var _id = document.getElementsByName("id");

for(i=0;i<_id.length>

if(_id[i].checked){

id = _id[i].value;

n += 1;

}

}

if(n==0){

alert("请选择一个项目");

return

}

var itemname = document.getElementById("itemname"+id).innerHTML;

itemname = itemname.replace(/]*>/g,''); //去除HTML tag

itemname = itemname.replace(/[ | ]*\n/g,'\n'); //去除行尾空白

itemname = itemname.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行

var price = document.getElementById("price"+id).innerHTML.replace("元","");

window.returnValue = itemname+","+price;

window.close();

}

但出错的不是Plist.asp页面,而是Cls_vbsPage.asp页面,程序指向Cls_vbsPge.asp错误,但这个页面其他页面引用就没有问题,我怀疑是Plist.asp的问题,但找了好半天没有找到原因所在,请高手帮忙看一下,在此表示感激不尽!

80040e14 mysql_【ASP】提示错误80040e14相关推荐

  1. asp中出现“错误 '80040e14' FROM 子句语法错误”原因

    当你的sql语句中出现 "错误 '80040e14' FROM 子句语法错误."错误时,请注意了,那有可能是你的表名的命名不规范造成的,比如你的表名是"user" ...

  2. sql无法写入mysql_安装sql2008R2数据库时提示错误1406,安装程序无法将值写入注册表项?...

    摘要: 安装sql2008R2数据库时提示错误1406,安装程序无法将值写入注册表项 \software\classes\msolapadmin2.msolapsources.1.怎么解决呢? 这个问 ...

  3. ASP.NET错误处理的方式(一)

    对Web应用程序来说,发生不可预知的错误和异常在所难免,我们必须为Web程序提供错误处理机制.当错误发生时,我们必须做好两件事情:一是将错误信息记录日志,发邮件通知网站维护人员,方便技术人员对错误进行 ...

  4. 未能加载 mysql.data_连接MySQL 提示错误”未能加载文件或程序集“MySql.Data, Version=5.1.4.0, Culture=neutral,……..” | 学步园...

    CodeSmith4.1.3版本连接MySQL 提示错误"未能加载文件或程序集"MySql.Data, Version=5.1.4.0, Culture=neutral,..... ...

  5. Navicat连接数据库成功,新建查询时提示错误“Cannot create file ……”

    Navicat连接数据库成功,新建查询时提示错误"Cannot create file --" 原因:编辑连接{高级}<设置位置>被修改,该oci.dll不正确 解决方 ...

  6. 请问,关闭子窗口提示错误,大家遇到这样的问题吗?

    请问,关闭子窗口提示错误,大家遇到这样的问题吗? Delphi / Windows SDK/API http://www.delphi2007.net/DelphiBase/html/delphi_2 ...

  7. Myeclipse开发环境下文件中出现的提示错误与解决方法:The import javax.servlet cannot be resolved?

    Myeclipse开发环境下文件中出现的提示错误与解决方法:The import javax.servlet cannot be resolved? 参考文章: (1)Myeclipse开发环境下文件 ...

  8. Eclipse无法编译,提示错误“找不到或者无法加载主类”解决方法

    Eclipse无法编译,提示错误"找不到或者无法加载主类"解决方法 参考文章: (1)Eclipse无法编译,提示错误"找不到或者无法加载主类"解决方法 (2) ...

  9. Chrome浏览器偶尔提示错误net::ERR_EMPTY_RESPONSE的解决方法

    Chrome浏览器偶尔提示错误net::ERR_EMPTY_RESPONSE的解决方法 参考文章: (1)Chrome浏览器偶尔提示错误net::ERR_EMPTY_RESPONSE的解决方法 (2) ...

最新文章

  1. Spring MVC 原理探秘 - 一个请求的旅行过程
  2. mysql dbcollat_Mysql Server 层混杂信息字典表 | 全方位认识 information_schem(四)
  3. c++ 函数的指针调用
  4. 微信小程序富文本解析点击图片放大_微信小程序解析富文本过程详解
  5. 点击弹出窗口外任意地方关闭弹出窗口
  6. 『设计模式』反射,反射程序员的快乐!为什么我老是加班?为什么我工资不如他多?原来是我不懂反射!
  7. spring学习(4):spring管理对象之间的关联关系
  8. UNIX(多线程):19---Future 类型详解
  9. MySQL主从延时这么长,怎么优化?
  10. mysql的建库建表语句_SQL语句(建库、建表、修改语句)
  11. Windows Server 2008 R2无密码共享设置
  12. paas-openshift
  13. 问题十七:怎么用ray tracing画多个球?
  14. java 手势识别_【人体分析-手势识别】-Java示例代码
  15. matlab数据归一化mapminmax函数
  16. 光盘文件格式-udf、iso9660、Joliet、Romeo
  17. 应聘总经理的答卷,供大家打分!(一)
  18. 广州考生报深大计算机,抢破头!这所大学既不是985也不是211,为什么广东考生都想上?...
  19. python笔记-05(条件、循环及其他语句)
  20. 微信运动刷步数软件有哪些?微信运动刷步软件推荐[

热门文章

  1. BeetleX之FastHttpApi服务使用详解
  2. Linux下搭建asp.net运行环境
  3. Docker最全教程之使用TeamCity来完成内部CI、CD流程(十七)
  4. Emit动态代理.NetCore迁移之旅
  5. 为什么选择.NETCore?
  6. Ocelot——初识基于.Net Core的API网关
  7. 开源分享 Unity3d客户端与C#分布式服务端游戏框架
  8. 微服务中的异步消息通讯
  9. DDD领域驱动之干货 (一)
  10. ASP.NET Core 网站在Docker中运行