Subversion Repositories DevTools

Rev

Rev 5957 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5957 Rev 6583
Line 61... Line 61...
61
'   iTotalRecords = total records without any filtering/limits
61
'   iTotalRecords = total records without any filtering/limits
62
'   iTotalDisplayRecords = filtered result count
62
'   iTotalDisplayRecords = filtered result count
63
 
63
 
64
oJSON.data("draw") = CInt(Request.QueryString("draw"))
64
oJSON.data("draw") = CInt(Request.QueryString("draw"))
65
oJSON.data("recordsTotal") = MaxCount
65
oJSON.data("recordsTotal") = MaxCount
66
oJSON.data("recordsFiltered") = MaxCount
66
'oJSON.data("recordsFiltered") = MaxCount
67
 
67
 
68
Dim vName
68
Dim vName
69
for each vName in Request.QueryString
69
for each vName in Request.QueryString
70
    oJSON.data("sReq_" & vName) = Request.QueryString(vName)
70
    oJSON.data("sReq_" & vName) = Request.QueryString(vName)
71
next
71
next
Line 178... Line 178...
178
 
178
 
179
SqlQry = "select * from ( "&_
179
SqlQry = "select * from ( "&_
180
            "select a.*, ROWNUM rnum from (" & BasicSql &_
180
            "select a.*, ROWNUM rnum from (" & BasicSql &_
181
                ") a where ROWNUM <= " & lastRow &_
181
                ") a where ROWNUM <= " & lastRow &_
182
            ") where rnum >= " & firstRow
182
            ") where rnum >= " & firstRow
-
 
183
'
-
 
184
'   Perform a query without pagination
-
 
185
'   Assume the record set is small enough that it won't impact speed
-
 
186
'
-
 
187
'
-
 
188
' Determine the size of the record set
-
 
189
'   Gives bad results when searching
-
 
190
Dim SqlCount: SqlCount = "select count(*) as count from (" & BasicSql & ")"
-
 
191
On Error Resume Next
-
 
192
objEH.ErrorRedirect = FALSE
-
 
193
objEH.TryORA ( OraSession )
-
 
194
Set rsQry = OraDatabase.DbCreateDynaset( SqlCount, ORADYN_DEFAULT )
-
 
195
objEH.CatchORA ( OraSession )
-
 
196
    If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
-
 
197
        MaxCount = rsQry("COUNT")
-
 
198
    End If
-
 
199
rsQry.Close
-
 
200
Set rsQry = Nothing
-
 
201
' Basic Header
-
 
202
'   iTotalRecords = total records without any filtering/limits
-
 
203
'   iTotalDisplayRecords = filtered result count
-
 
204
'oJSON.data("recordsTotal") = MaxCount
-
 
205
oJSON.data("recordsFiltered") = MaxCount
183
 
206
 
184
' Assist in debug
207
' Assist in debug
185
oJSON.data("BasicSql") = BasicSql
208
oJSON.data("BasicSql") = BasicSql
186
'oJSON.data("SqlQry") = SqlQry
209
'oJSON.data("SqlQry") = SqlQry
187
 
210