MS-SQL 分页函数+ASP
2009-06-04 12:06:45 来源:WEB开发网dim maxCount
dim myobj
dim rsCount
maxCount = 0
Set myobj = Server.CreateObject("ADODB.Command")
with myobj
.ActiveConnection = conn
.CommandText = "USP_GetTotal"
.CommandType = 4
.Prepared = true
.Parameters.append .CreateParameter("@strTableName", 200, 1, 30, strTableName)
.Parameters.append .CreateParameter("@strWhere", 200, 1, 2000, strWhere)
Set rsCount = .Execute
end with
Set myobj = Nothing
maxCount = rsCount("Total")
rsCount.close:Set rsCount = Nothing
getDataRowCount = maxCount
end function
'单表分页存储过程
sub getDataRS()
dim obj
Set obj = Server.CreateObject("ADODB.Command")
with obj
.ActiveConnection = conn
.CommandText = "USP_GetList"
.CommandType = 4
.Prepared = true
.Parameters.append .CreateParameter("@pageIndex", 3, 1, 4, iPageIndex)
.Parameters.append .CreateParameter("@pageSize", 3, 1, 4, iPageSize)
.Parameters.append .CreateParameter("@SID", 200, 1, 30, SID) ' 2000
.Parameters.append .CreateParameter("@strGetField", 200, 1, 1000, strGetField)
.Parameters.append .CreateParameter("@tableName", 200, 1, 30, strTableName)
- ››sql server自动生成批量执行SQL脚本的批处理
- ››sql server 2008亿万数据性能优化
- ››SQL Server 2008清空数据库日志方法
- ››sqlserver安装和简单的使用
- ››SQL Sever 2008 R2 数据库管理
- ››SQL SERVER无法安装成功,sqlstp.log文件提示[未发...
- ››Sql Server中通过父记录查找出所有关联的子记录
- ››SqlServer触发器、存储过程和函数
- ››SQL Server 中的事务(含义,属性,管理)
- ››Sqlite数据库插入和读取图片数据
- ››Sql server 2005拒绝了对对象 'xx表' (数...
- ››Sql server 2005拒绝了对对象 'xx表' (数...
更多精彩
赞助商链接