<%
Class dhtmlGetRows
'******* PRIVATE MEMBER VARIABLES **********
Private iRecsPerPage
Private strTHString
'*******************************************
'************ Initialize Event *************
Private Sub Class_Initialize()
iRecsPerPage = 10 'assign a default value
End Sub
'*******************************************
'************ PROPERTY LET/GET *************
Public Property Let THString(strValue)
'Replace all apostrophes with \'
strTHString = Replace(strValue, "'", "\'")
End Property
Public Property Get THString()
THString = strTHString
End Property
Public Property Let RecsPerPage(iValue)
If iValue > 0 and IsNumeric(iValue) then
iRecsPerPage = CInt(iValue)
End If
End Property
Public Property Get RecsPerPage()
RecsPerPage = iRecsPerPage
End Property
'*******************************************
'**************** METHODS ******************
Public Function GenerateHTML(objRS)
'Begin by getting an array of the data
Dim aValues
aValues = objRS.GetRows()
'Find the value of rows and columns
Dim iCols, iRows
iCols = UBound(aValues, 1)
iRows = UBound(aValues, 2)
Dim strOutput
'Display the initial script block
strOutput = "" & vbCrLf & vbCrLf
'Now display the HTML table
strOutput = strOutput & vbCrLf & "
" & vbCrLf & _
vbCrLf & vbCrLf & ""
GenerateHTML = strOutput
End Function
'*******************************************
End Class
%>