sql = ""
sql = sql & " SELECT A.BOX_OWNER_ID , A.SENDDOC_NO , A.TO_DATE , A.TO_TIME , A.FROM_ACT_ID , "
sql = sql & " A.DOC_SUBJECT , A.DOC_DESC , A.OBJECT_ID , B.CATE_ID , B.DOC_OWNER_ID , B.IMPT_ID , B.EXP_ID , A.FLG_REC , "
sql = sql & " NVL(C.CNT_FILE,0) AS FILE_SEQ , NVL(D.CNT_OWN, 0) AS FW_SEQ "
sql = sql & " FROM DOCT_INBOX A , DOCT_DRAFTS B , "
sql = sql & " ( SELECT SENDDOC_NO ,COUNT(*) AS CNT_FILE "
sql = sql & " FROM DOCT_FILE_ATTACH "
sql = sql & " GROUP BY SENDDOC_NO ) C , "
sql = sql & " (SELECT BOX_OWNER_ID, SENDDOC_NO, TO_DATE, TO_TIME, COUNT(*) AS CNT_OWN "
sql = sql & " FROM DOCT_FORWARD "
sql = sql & " GROUP BY BOX_OWNER_ID, SENDDOC_NO, TO_DATE, TO_TIME) D "
sql = sql & " WHERE A.SENDDOC_NO = B.SENDDOC_NO "
sql = sql & " AND B.SENDDOC_NO = C.SENDDOC_NO(+) "
sql = sql & " AND A.BOX_OWNER_ID = D.BOX_OWNER_ID(+) "
sql = sql & " AND A.SENDDOC_NO = D. SENDDOC_NO(+) "
sql = sql & " AND A.TO_DATE = D.TO_DATE(+) "
sql = sql & " AND A.TO_TIME = D.TO_TIME(+) "
sql = sql & " AND A.BOX_OWNER_ID = '" & Session("ACT_ID") & "' "
sql = sql & " AND A.FLG_DEL IS NULL "
'response.Write(sql)
Set Rs_scdoc = Server.CreateObject("ADODB.RecordSet")
Rs_scdoc.Open sql ,objConn, 1,3
'Set Rs_scdoc = objConn.Execute(sql)
Code (VBScript)
Dim PageLen,PageNo,TotalRecord,TotalPage,No,intID
PageLen = 2
TotalRecord = Rs_scdoc.RecordCount
PageNo = Request.QueryString("PageNo")
if PageNo = "" Then PageNo = 1
Rs_scdoc.PageSize = PageLen
TotalPage = Rs_scdoc.PageCount
Rs_scdoc.AbsolutePage = PageNo '<<< ADODB.Recordset error '800a0cb3' Current Recordset does not support bookmarks. This may be a limitation of the provider or of the selected cursortype.