Hi
I am have problem getting opening recordset. I have spend whole to track it down, with now luck. Please could you help me.
Many thank.
Here is the asp code.
This is the only code i have on my asp page.
<%
' BEGIN CONSTANTS
Dim CONN_STRING
Dim iPageSize 'How big our pages are
Dim iPageCount 'The number of pages we get back
Dim iPageCurrent 'The page we want to show
Dim strOrderBy 'A fake parameter used to illustrate passing them
Dim strSQL 'SQL command to execute
Dim objPagingConn 'The ADODB connection object
Dim objPagingRS 'The ADODB recordset object
Dim iRecordsShown 'Loop controller for displaying just iPageSize records
Dim I 'Standard looping var
' Get parameters
iPageSize = 10 ' You could easily allow users to change this
' Retrieve page to show or default to 1
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
' I'm using a DSN-less connection.
CONN_STRING = "DBQ=" & Server.MapPath("../vmeWEB.mdb") & ";"
CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"
' Build our SQL
strSQL = "SELECT * FROM tblProperty;"
' Create and open our connection
Set objPagingConn = Server.CreateObject("ADODB.Connection")
objPagingConn.Open CONN_STRING
' Create recordset and set the page size
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
' You can change other settings as with any RS 'objPagingRS.CursorLocation = adUseClient
objPagingRS.CacheSize = iPageSize
<----- Error is Here ------>
' Open RS,
objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText
' Close DB objects and free variables
objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing
' END RUNTIME CODE
%>
I am have problem getting opening recordset. I have spend whole to track it down, with now luck. Please could you help me.
Many thank.
Here is the asp code.
This is the only code i have on my asp page.
<%
' BEGIN CONSTANTS
Dim CONN_STRING
Dim iPageSize 'How big our pages are
Dim iPageCount 'The number of pages we get back
Dim iPageCurrent 'The page we want to show
Dim strOrderBy 'A fake parameter used to illustrate passing them
Dim strSQL 'SQL command to execute
Dim objPagingConn 'The ADODB connection object
Dim objPagingRS 'The ADODB recordset object
Dim iRecordsShown 'Loop controller for displaying just iPageSize records
Dim I 'Standard looping var
' Get parameters
iPageSize = 10 ' You could easily allow users to change this
' Retrieve page to show or default to 1
If Request.QueryString("page") = "" Then
iPageCurrent = 1
Else
iPageCurrent = CInt(Request.QueryString("page"))
End If
' I'm using a DSN-less connection.
CONN_STRING = "DBQ=" & Server.MapPath("../vmeWEB.mdb") & ";"
CONN_STRING = CONN_STRING & "Driver={Microsoft Access Driver (*.mdb)};"
' Build our SQL
strSQL = "SELECT * FROM tblProperty;"
' Create and open our connection
Set objPagingConn = Server.CreateObject("ADODB.Connection")
objPagingConn.Open CONN_STRING
' Create recordset and set the page size
Set objPagingRS = Server.CreateObject("ADODB.Recordset")
objPagingRS.PageSize = iPageSize
' You can change other settings as with any RS 'objPagingRS.CursorLocation = adUseClient
objPagingRS.CacheSize = iPageSize
<----- Error is Here ------>
' Open RS,
objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText
' Close DB objects and free variables
objPagingRS.Close
Set objPagingRS = Nothing
objPagingConn.Close
Set objPagingConn = Nothing
' END RUNTIME CODE
%>