asp實現(xiàn)獲取MSSQL數(shù)據(jù)庫表指定條件行數(shù)的函數(shù)_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:asp實現(xiàn)讀取數(shù)據(jù)庫輸出json代碼代碼如下: Function GetTable(Table,Where,Order,OrderSort,curpage, pagesize,MiniJson) 'Author : nigou '使用方法 : Response.Write GetTable(Table表名,Where條件,Order主鍵(必須),OrderSort(asc,desc),curpage當前頁, pagesize每頁條數(shù),MiniJson是否輸出為miniUI
這篇文章主要介紹了asp實現(xiàn)獲取MSSQL數(shù)據(jù)庫表指定條件行數(shù)的函數(shù)的的相關(guān)資料,需要的朋友可以參考下
代碼如下:
'數(shù)據(jù)庫表行數(shù)函數(shù),這是取表的行數(shù)
Function GetTblRows(TblName)
'如果TblName表名值為空,則
if TblName="" Then
GetTblRows="未知TblName"
exit Function
Else
set rec = server.createobject("adodb.recordset")
SQL="EXEC sp_spaceused "&TblName
rec.open sql,conn,1,1
GetTblRows=Trim(rec("rows"))
rec.close
set rec=nothing
end if
End Function
如何使用?
代碼如下:
<%=GetTblRows("表格名稱")%>
以上就是本文所述的全部內(nèi)容了,希望大家能夠喜歡。
分享:JScript中遍歷Request表單參數(shù)集合的方法JScript下有一個Enumerator對象可以遍歷集合。根據(jù)它的文檔寫了以下程序,可以遍歷整個Request.QueryString集合: 代碼如下: var params = new Enumerator(Request.QueryString); while (!params.atEnd()) { Response.Write(params.item() + : + Request.QueryString(p
相關(guān)ASP教程:
- 相關(guān)鏈接:
復制本頁鏈接| 搜索asp實現(xiàn)獲取MSSQL數(shù)據(jù)庫表指定條件行數(shù)的函數(shù)
- 教程說明:
ASP教程-asp實現(xiàn)獲取MSSQL數(shù)據(jù)庫表指定條件行數(shù)的函數(shù)
。