Hi guys,
I’m struggling again I think down to the lack of ASP documentation. Be great if you could point me in the right direction. I can get the initial rows to populate then when I scroll down I get an XML error. No clue why so here’s the code…
- - - - - - - -
then this is my ASP page… (getGridRecords.asp)
<%@ LANGUAGE = VBScript %>
<% option explicit %>
<% call open_conn() %>
<%
’ set content type and xml tag
Response.ContentType = “text/xml”
Response.write("<?xml version=""1.0"" encoding=""UTF-8""?>")
’ define variables from incoming values
Dim posStart, count
If not isEmpty(Request.QueryString(“posStart”)) Then
posStart = Request.QueryString(“posStart”)
Else
posStart = 0
End If
If not isEmpty(Request.QueryString(“count”)) Then
count = Request.QueryString(“count”)
Else
count = 100
End If
’ query to products table
sql = “dbo.SP_my_msdss_all " & posStart & “,” & count
’ if this is the first query - get total number of records in the query result
Dim sqlCount, totalCount
If posStart = 0 Then
Call open_read(sql,0)
totalCount = rc(“cnt”)
Else
totalCount = “”
End If
’ Next recordset
set rc = rc.nextRecordSet()
getResults = rc.getrows()
’ output data in XML format
Response.write(”")
for counter=0 to ubound(getResults,2)
Response.write("")
Response.write("")
Response.write(getResults(1,counter)) ’ value for product name
Response.write("")
Response.write("")
Response.write(getResults(2,counter)) ’ value for internal code
Response.write("")
Response.write("")
Response.write(getResults(0,counter)) ’ value for price
Response.write("")
Response.write("")
next
Response.write("")
rc.Close()
%>
<% call close_conn() %>
Thanks for the help!
Dale