<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: Grid ASP + MSSQL with LIMIT</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grid-asp-mssql-with-limit</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/grid-asp-mssql-with-limit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Groxx on Grid ASP + MSSQL with LIMIT</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-asp-mssql-with-limit#p19198</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-asp-mssql-with-limit#p19198</guid>
        	        	<description><![CDATA[<p>If you&#39;re using T-SQL 2005 or later with MSSQL, there&#39;s a much easier way:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9436' value='Select Code' data-codeid='sfcode9436' /></p>
<div class='sfcode' id='sfcode9436'>
<p>select Paged.* from (</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;&#34;white-space:pre&#34;&#34;&#34;&#34;&#34;&#34;> </span>[Your select statement goes here, and include this column:]</p>
<p><span style=&#34;&#34;&#34;&#34;&#34;&#34;white-space:&#34;&#34;&#34;&#34;&#34;> </span>ROW_NUMBER() over (order by [order you desire in the end]) as RowNum</p>
<p>) as Paged</p>
<p>where Paged.RowNum between @start and @end</p>
<p>order by Paged.RowNum ;</p>
</div>
<p>And viola <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" /> &#160;Full pagination, all on the DB, and significantly faster if you&#39;d be returning many rows. &#160;If you want to find the number of rows, just include a column like this in the inner query:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1415' value='Select Code' data-codeid='sfcode1415' /></p>
<div class='sfcode' id='sfcode1415'>COUNT(*) over () as NumRecords</div>
<p>And each row will now have that column, all of which contain the total count built by the query. &#160;From there, finding your page looks like this in VB:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2058' value='Select Code' data-codeid='sfcode2058' /></p>
<div class='sfcode' id='sfcode2058'>
<p>Dim records As Integer = Integer.parse(&#60;DataTable&#62;.Rows(0)(&#34;NumRecords&#34;))</p>
<p>Dim pages As Integer = 0</p>
<p>pages = -Int(-(records* 1.0 / &#60;DataTable&#62;.Rows.Count * 1.0)) &#39; Ceil w/ decimal division.</p>
</div>
]]></description>
        	        	<pubDate>Wed, 18 Aug 2010 21:38:40 +0300</pubDate>
        </item>
        <item>
        	<title>Roca-Brazil on Grid ASP + MSSQL with LIMIT</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-asp-mssql-with-limit#p19195</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-asp-mssql-with-limit#p19195</guid>
        	        	<description><![CDATA[<p>I decided to share this code for those using ASP + MSSQL and not found a solution to the limit, made me Mysql</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5629' value='Select Code' data-codeid='sfcode5629' /></p>
<div class='sfcode' id='sfcode5629'>&#60;%<br />Response.ContentType = &#34;text/xml&#34;<br />Response.Charset = &#34;UTF-8&#34; &#39;or ISO-8859-1<br />&#39;Response.Write &#34;&#60;?xml version=&#34;&#34;1.0&#34;&#34; encoding=&#34;&#34;ISO-8859-1&#34;&#34; ?&#62;&#34;<br />Response.Flush()</p>
<p>strIdx&#160; = Request(&#34;sidx&#34;)<br />strOrd&#160; = Request(&#34;sord&#34;)</p>
<p>strSearchOn = Request(&#34;_search&#34;)<br />If (strSearchOn = &#34;true&#34;) Then<br />strField = Request(&#34;searchField&#34;)<br />&#160;If (strField = &#34;invid&#34; Or strField = &#34;invdate&#34; Or strField = &#34;amount&#34;) Then<br />&#160; strFieldData = Request(&#34;searchString&#34;)<br />&#160; strSearchOper = Request(&#34;searchOper&#34;)<br />&#160; &#39;construct where&#39;<br />&#160; strWhere = &#34; Where &#34; &#38; strField</p>
<p>&#160; Select Case strSearchOper<br />&#160; Case &#34;bw&#34; : &#39;Begin With<br />&#160;&#160; strFieldData = strFieldData &#38; &#34;%&#34;<br />&#160;&#160; strWhere = strWhere &#38; &#34; LIKE &#39;&#34; &#38; strFieldData &#38; &#34;&#39;&#34;<br />&#160; Case &#34;eq&#34; : &#39;Equal<br />&#160;&#160; If(IsNumeric(strFieldData)) Then<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; = &#34; &#38; strFieldData<br />&#160;&#160; Else<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; = &#39;&#34; &#38; strFieldData &#38; &#34;&#39;&#34;<br />&#160;&#160; End If<br />&#160; Case &#34;ne&#34;: &#39;Not Equal<br />&#160;&#160;&#160; If(IsNumeric(strFieldData)) Then<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#60;&#62; &#34; &#38; strFieldData<br />&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#60;&#62; &#39;&#34;&#38; strFieldData &#38;&#34;&#39;&#34;<br />&#160;&#160;&#160; End If<br />&#160; Case &#34;lt&#34;: &#39;Less Than<br />&#160;&#160;&#160; If(IsNumeric(strFieldData)) Then<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#60; &#34; &#38; strFieldData<br />&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#60; &#39;&#34;&#38; strFieldData &#38;&#34;&#39;&#34;<br />&#160;&#160;&#160; End If<br />&#160; Case &#34;le&#34;: &#39;Less Or Equal<br />&#160;&#160;&#160; If(IsNumeric(strFieldData)) Then<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#60;= &#34; &#38; strFieldData<br />&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#60;= &#39;&#34;&#38; strFieldData &#38;&#34;&#39;&#34;<br />&#160;&#160;&#160; End If<br />&#160; Case &#34;gt&#34;: &#39;Greater Than<br />&#160;&#160;&#160; If(IsNumeric(strFieldData)) Then<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#62; &#34; &#38; strFieldData<br />&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#62; &#39;&#34;&#38; strFieldData &#38;&#34;&#39;&#34;<br />&#160;&#160;&#160; End If<br />&#160; Case &#34;ge&#34;: &#39;Greater Or Equal<br />&#160;&#160;&#160; If(IsNumeric(strFieldData)) Then<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#62;= &#34; &#38; strFieldData<br />&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160; strWhere = strWhere &#38; &#34; &#62;= &#39;&#34;&#38; strFieldData &#38;&#34;&#39;&#34;<br />&#160;&#160;&#160; End If<br />&#160; Case &#34;ew&#34; : &#39;End With<br />&#160;&#160; strWhere = strWhere &#38; &#34; LIKE &#39;%&#34; &#38; strFieldData &#38; &#34;&#39;&#34;<br />&#160; Case &#34;cn&#34; : &#39;Contains<br />&#160;&#160; strWhere = strWhere &#38; &#34; LIKE &#39;%&#34; &#38; strFieldData &#38; &#34;%&#39;&#34;<br />&#160; End Select<br />&#160;End if<br />End If</p>
<p>Dim rs_user<br />Dim rs_user_numRows</p>
<p>Set rs_user = Server.CreateObject(&#34;ADODB.Recordset&#34;)<br />rs_user.ActiveConnection = MM_WEBINTRANET_STRING &#39;Provider=SQLOLEDB.1;Initial...<br />rs_user.Source = &#34;SELECT invid, invdate, amount, tax,total, note FROM invheader &#34;&#38;strWhere&#38;&#34; order by &#34;&#38;strIdx&#38;&#34; &#34;&#38;strOrd&#38;&#34;&#34;<br />rs_user.CursorType = 0<br />rs_user.CursorLocation = 2<br />rs_user.LockType = 1<br />rs_user.Open()</p>
<p>rs_user_numRows = 0</p>
<p>%&#62;<br />&#60;%<br />Dim Repeat1__numRows<br />Dim Repeat1__index</p>
<p>Repeat1__numRows = Request.QueryString(&#34;rows&#34;) &#39;number line<br />Repeat1__index = 0<br />rs_user_numRows = rs_user_numRows + Repeat1__numRows<br />%&#62;<br />&#60;%<br />&#39;&#160; *** Recordset Stats, Move To Record, and Go To Record: declare stats variables</p>
<p>&#39; set the record count<br />rs_user_total = rs_user.RecordCount</p>
<p>&#39; set the number of rows displayed on this page<br />If (rs_user_numRows &#60; 0) Then<br />&#160; rs_user_numRows = rs_user_total<br />Elseif (rs_user_numRows = 0) Then<br />&#160; rs_user_numRows = 1<br />End If</p>
<p>&#39; set the first and last displayed record<br />rs_user_first = 1<br />rs_user_last&#160; = rs_user_first + rs_user_numRows - 1</p>
<p>&#39; if we have the correct record count, check the other stats<br />If (rs_user_total &#60;&#62; -1) Then<br />&#160; If (rs_user_first &#62; rs_user_total) Then rs_user_first = rs_user_total<br />&#160; If (rs_user_last &#62; rs_user_total) Then rs_user_last = rs_user_total<br />&#160; If (rs_user_numRows &#62; rs_user_total) Then rs_user_numRows = rs_user_total<br />End If<br />%&#62;<br />&#60;%<br />&#39; *** Recordset Stats: if we don&#39;t know the record count, manually count them</p>
<p>If (rs_user_total = -1) Then</p>
<p>&#160; &#39; count the total records by iterating through the recordset<br />&#160; rs_user_total=0<br />&#160; While (Not rs_user.EOF)<br />&#160;&#160;&#160; rs_user_total = rs_user_total + 1<br />&#160;&#160;&#160; rs_user.MoveNext<br />&#160; Wend</p>
<p>&#160; &#39; reset the cursor to the beginning<br />&#160; If (rs_user.CursorType &#62; 0) Then<br />&#160;&#160;&#160; rs_user.MoveFirst<br />&#160; Else<br />&#160;&#160;&#160; rs_user.Requery<br />&#160; End If</p>
<p>&#160; &#39; set the number of rows displayed on this page<br />&#160; If (rs_user_numRows &#60; 0 Or rs_user_numRows &#62; rs_user_total) Then<br />&#160;&#160;&#160; rs_user_numRows = rs_user_total<br />&#160; End If</p>
<p>&#160; &#39; set the first and last displayed record<br />&#160; rs_user_first = 1<br />&#160; rs_user_last = rs_user_first + rs_user_numRows - 1<br />&#160; If (rs_user_first &#62; rs_user_total) Then rs_user_first = rs_user_total<br />&#160; If (rs_user_last &#62; rs_user_total) Then rs_user_last = rs_user_total</p>
<p>End If<br />%&#62;<br />&#60;%<br />&#39; *** Move To Record and Go To Record: declare variables</p>
<p>Set MM_rs&#160;&#160;&#160; = rs_user<br />MM_rsCount&#160;&#160; = rs_user_total<br />MM_size&#160;&#160;&#160;&#160;&#160; = rs_user_numRows<br />MM_uniqueCol = &#34;&#34;<br />MM_paramName = &#34;&#34;<br />MM_offset = 0<br />MM_atTotal = false<br />MM_paramIsDefined = false<br />If (MM_paramName &#60;&#62; &#34;&#34;) Then<br />&#160; MM_paramIsDefined = (Request.QueryString(MM_paramName) &#60;&#62; &#34;&#34;)<br />End If<br />%&#62;<br />&#60;%<br />&#39; *** Move To Record: handle &#39;index&#39; or &#39;offset&#39; parameter</p>
<p>if (Not MM_paramIsDefined And MM_rsCount &#60;&#62; 0) then</p>
<p>&#160; &#39; use index parameter if defined, otherwise use offset parameter<br />&#160; If Request.QueryString(&#34;page&#34;) = &#34;&#34; or Request.QueryString(&#34;page&#34;) = 1 Then<br />&#160; page = 0<br />&#160; ElseIf Request.QueryString(&#34;page&#34;) &#62; 1 Then<br />&#160; page = int(Request.QueryString(&#34;page&#34;)) * int(Request.QueryString(&#34;rows&#34;)) - int(Request.QueryString(&#34;rows&#34;))<br />&#160; else &#160;<br />&#160; page = Request.QueryString(&#34;page&#34;)<br />&#160; End If<br />&#160; <br />&#160; r = Request.QueryString(&#34;index&#34;)<br />&#160; If r = &#34;&#34; Then r = page<br />&#160; If r &#60;&#62; &#34;&#34; Then MM_offset = Int(r)</p>
<p>&#160; &#39; if we have a record count, check if we are past the end of the recordset<br />&#160; If (MM_rsCount &#60;&#62; -1) Then<br />&#160;&#160;&#160; If (MM_offset &#62;= MM_rsCount Or MM_offset = -1) Then&#160; &#39; past end or move last<br />&#160;&#160;&#160;&#160;&#160; If ((MM_rsCount Mod MM_size) &#62; 0) Then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39; last page not a full repeat region<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)<br />&#160;&#160;&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; MM_offset = MM_rsCount - MM_size<br />&#160;&#160;&#160;&#160;&#160; End If<br />&#160;&#160;&#160; End If<br />&#160; End If</p>
<p>&#160; &#39; move the cursor to the selected record<br />&#160; i = 0<br />&#160; While ((Not MM_rs.EOF) And (i &#60; MM_offset Or MM_offset = -1))<br />&#160;&#160;&#160; MM_rs.MoveNext<br />&#160;&#160;&#160; i = i + 1<br />&#160; Wend<br />&#160; If (MM_rs.EOF) Then MM_offset = i&#160; &#39; set MM_offset to the last possible record</p>
<p>End If<br />%&#62;<br />&#60;%<br />&#39; *** Move To Record: if we dont know the record count, check the display range</p>
<p>If (MM_rsCount = -1) Then</p>
<p>&#160; &#39; walk to the end of the display range for this page<br />&#160; i = MM_offset<br />&#160; While (Not MM_rs.EOF And (MM_size &#60; 0 Or i &#60; MM_offset + MM_size))<br />&#160;&#160;&#160; MM_rs.MoveNext<br />&#160;&#160;&#160; i = i + 1<br />&#160; Wend</p>
<p>&#160; &#39; if we walked off the end of the recordset, set MM_rsCount and MM_size<br />&#160; If (MM_rs.EOF) Then<br />&#160;&#160;&#160; MM_rsCount = i<br />&#160;&#160;&#160; If (MM_size &#60; 0 Or MM_size &#62; MM_rsCount) Then MM_size = MM_rsCount<br />&#160; End If</p>
<p>&#160; &#39; if we walked off the end, set the offset based on page size<br />&#160; If (MM_rs.EOF And Not MM_paramIsDefined) Then<br />&#160;&#160;&#160; If (MM_offset &#62; MM_rsCount - MM_size Or MM_offset = -1) Then<br />&#160;&#160;&#160;&#160;&#160; If ((MM_rsCount Mod MM_size) &#62; 0) Then<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)<br />&#160;&#160;&#160;&#160;&#160; Else<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; MM_offset = MM_rsCount - MM_size<br />&#160;&#160;&#160;&#160;&#160; End If<br />&#160;&#160;&#160; End If<br />&#160; End If</p>
<p>&#160; &#39; reset the cursor to the beginning<br />&#160; If (MM_rs.CursorType &#62; 0) Then<br />&#160;&#160;&#160; MM_rs.MoveFirst<br />&#160; Else<br />&#160;&#160;&#160; MM_rs.Requery<br />&#160; End If</p>
<p>&#160; &#39; move the cursor to the selected record<br />&#160; i = 0<br />&#160; While (Not MM_rs.EOF And i &#60; MM_offset)<br />&#160;&#160;&#160; MM_rs.MoveNext<br />&#160;&#160;&#160; i = i + 1<br />&#160; Wend<br />End If<br />%&#62;<br />&#60;%<br />&#39; *** Move To Record: update recordset stats</p>
<p>&#39; set the first and last displayed record<br />rs_user_first = MM_offset + 1<br />rs_user_last&#160; = MM_offset + MM_size<br />If (MM_rsCount &#60;&#62; -1) Then<br />&#160; If (rs_user_first &#62; MM_rsCount) Then rs_user_first = MM_rsCount<br />&#160; If (rs_user_last &#62; MM_rsCount) Then rs_user_last = MM_rsCount<br />End If</p>
<p>&#39; set the boolean used by hide region to check if we are on the last record<br />MM_atTotal = (MM_rsCount &#60;&#62; -1 And MM_offset + MM_size &#62;= MM_rsCount)<br />%&#62;<br />&#60;%<br />&#39; *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters</p>
<p>&#39; create the list of parameters which should not be maintained<br />MM_removeList = &#34;&#38;index=&#34;<br />If (MM_paramName &#60;&#62; &#34;&#34;) Then MM_removeList = MM_removeList &#38; &#34;&#38;&#34; &#38; MM_paramName &#38; &#34;=&#34;<br />MM_keepURL=&#34;&#34;:MM_keepForm=&#34;&#34;:MM_keepBoth=&#34;&#34;:MM_keepNone=&#34;&#34;</p>
<p>&#39; add the URL parameters to the MM_keepURL string<br />For Each Item In Request.QueryString<br />&#160; NextItem = &#34;&#38;&#34; &#38; Item &#38; &#34;=&#34;<br />&#160; If (InStr(1,MM_removeList,NextItem,1) = 0) Then<br />&#160;&#160;&#160; MM_keepURL = MM_keepURL &#38; NextItem &#38; Server.URLencode(Request.QueryString(Item))<br />&#160; End If<br />Next</p>
<p>&#39; add the Form variables to the MM_keepForm string<br />For Each Item In Request.Form<br />&#160; NextItem = &#34;&#38;&#34; &#38; Item &#38; &#34;=&#34;<br />&#160; If (InStr(1,MM_removeList,NextItem,1) = 0) Then<br />&#160;&#160;&#160; MM_keepForm = MM_keepForm &#38; NextItem &#38; Server.URLencode(Request.Form(Item))<br />&#160; End If<br />Next</p>
<p>&#39; create the Form + URL string and remove the intial &#39;&#38;&#39; from each of the strings<br />MM_keepBoth = MM_keepURL &#38; MM_keepForm<br />if (MM_keepBoth &#60;&#62; &#34;&#34;) Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)<br />if (MM_keepURL &#60;&#62; &#34;&#34;)&#160; Then MM_keepURL&#160; = Right(MM_keepURL, Len(MM_keepURL) - 1)<br />if (MM_keepForm &#60;&#62; &#34;&#34;) Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)</p>
<p>&#39; a utility function used for adding additional parameters to these strings<br />Function MM_joinChar(firstItem)<br />&#160; If (firstItem &#60;&#62; &#34;&#34;) Then<br />&#160;&#160;&#160; MM_joinChar = &#34;&#38;&#34;<br />&#160; Else<br />&#160;&#160;&#160; MM_joinChar = &#34;&#34;<br />&#160; End If<br />End Function<br />%&#62;<br />&#60;%<br />&#39; *** Move To Record: set the strings for the first, last, next, and previous links</p>
<p>MM_keepMove = MM_keepBoth<br />MM_moveParam = &#34;index&#34;</p>
<p>&#39; if the page has a repeated region, remove &#39;offset&#39; from the maintained parameters<br />If (MM_size &#62; 0) Then<br />&#160; MM_moveParam = &#34;page&#34;<br />&#160; If (MM_keepMove &#60;&#62; &#34;&#34;) Then<br />&#160;&#160;&#160; params = Split(MM_keepMove, &#34;&#38;&#34;)<br />&#160;&#160;&#160; MM_keepMove = &#34;&#34;<br />&#160;&#160;&#160; For i = 0 To UBound(params)<br />&#160;&#160;&#160;&#160;&#160; nextItem = Left(params(i), InStr(params(i),&#34;=&#34;) - 1)<br />&#160;&#160;&#160;&#160;&#160; If (StrComp(nextItem,MM_moveParam,1) &#60;&#62; 0) Then<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; MM_keepMove = MM_keepMove &#38; &#34;&#38;&#34; &#38; params(i)<br />&#160;&#160;&#160;&#160;&#160; End If<br />&#160;&#160;&#160; Next<br />&#160;&#160;&#160; If (MM_keepMove &#60;&#62; &#34;&#34;) Then<br />&#160;&#160;&#160;&#160;&#160; MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)<br />&#160;&#160;&#160; End If<br />&#160; End If<br />End If</p>
<p>&#39; set the strings for the move to links<br />If (MM_keepMove &#60;&#62; &#34;&#34;) Then MM_keepMove = MM_keepMove &#38; &#34;&#38;&#34;<br />urlStr = Request.ServerVariables(&#34;URL&#34;) &#38; &#34;?&#34; &#38; MM_keepMove &#38; MM_moveParam &#38; &#34;=&#34;<br />MM_moveFirst = urlStr &#38; &#34;0&#34;<br />MM_moveLast&#160; = urlStr &#38; &#34;-1&#34;<br />MM_moveNext&#160; = urlStr &#38; Cstr(MM_offset + MM_size)<br />prev = MM_offset - MM_size<br />If (prev &#60; 0) Then prev = 0<br />MM_movePrev&#160; = urlStr &#38; Cstr(prev)<br />%&#62;<br />&#60;%<br />TM_counter = 0<br />For i = 1 to rs_user_total Step MM_size<br />TM_counter = TM_counter + 1<br />TM_PageEndCount = i + MM_size - 1<br />next<br />%&#62;<br />&#60;%<br />&#39;Response.Write &#34;&#60;?xml version=&#39;1.0&#39; encoding=&#39;ISO-8859-1&#39;?&#62;&#34; &#38; vbcrlf !for accents<br />Response.Write &#34;&#60;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;?&#62;&#34; &#38; vbcrlf<br />Response.Write&#160; &#34;&#60;rows&#62;&#34; &#38; vbcrlf<br />Response.Write &#34;&#60;page&#62;&#34;&#38;Request(&#34;page&#34;)&#38;&#34;&#60;/page&#62;&#34; &#38; vbcrlf<br />Response.Write &#34;&#60;total&#62;&#34;&#38;TM_counter&#38;&#34;&#60;/total&#62;&#34; &#38; vbcrlf <br />Response.Write &#34;&#60;records&#62;&#34;&#38;rs_user_total&#38;&#34;&#60;/records&#62;&#34; &#38; vbcrlf &#160;<br />&#160;<br />While ((Repeat1__numRows &#60;&#62; 0) AND (NOT rs_user.EOF)) <br />%&#62;<br />&#60;% <br />total = total + 1</p>
<p>Response.Write &#34;&#60;row id=&#39;&#34; &#38; total &#38; &#34;&#39;&#62;&#34; &#38; vbcrlf <br />Response.Write &#34;&#60;cell&#62;&#60;![CDATA[&#34; &#38; Trim(rs_user.Fields.Item(&#34;invid&#34;).Value) &#38; &#34;]]&#62;&#60;/cell&#62;&#34; &#38; vbcrlf&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />Response.Write &#34;&#60;cell&#62;&#60;![CDATA[&#34; &#38; Trim(rs_user.Fields.Item(&#34;invidate&#34;).Value) &#38; &#34;]]&#62;&#60;/cell&#62;&#34; &#38; vbcrlf&#160;&#160;&#160; &#160;<br />Response.Write &#34;&#60;cell&#62;&#60;![CDATA[&#34; &#38; Trim(rs_user.Fields.Item(&#34;amount&#34;).Value) &#38; &#34;]]&#62;&#60;/cell&#62;&#34; &#38; vbcrlf&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />Response.Write &#34;&#60;cell&#62;&#60;![CDATA[&#34; &#38; Trim(rs_user.Fields.Item(&#34;tax&#34;).Value) &#38; &#34;]]&#62;&#60;/cell&#62;&#34; &#38; vbcrlf&#160;&#160;&#160; &#160;<br />Response.Write &#34;&#60;cell&#62;&#60;![CDATA[&#34; &#38; Trim(rs_user.Fields.Item(&#34;total&#34;).Value) &#38; &#34;]]&#62;&#60;/cell&#62;&#34; &#38; vbcrlf <br />Response.Write &#34;&#60;/row&#62;&#34; &#38; vbcrlf&#160;&#160; &#160;<br />&#160; <br />&#160; Repeat1__index=Repeat1__index+1<br />&#160; Repeat1__numRows=Repeat1__numRows-1<br />&#160; rs_user.MoveNext()<br />Wend<br />Response.Write &#34;&#60;/rows&#62;&#34; <br />%&#62;<br />&#60;%<br />rs_user.Close()<br />Set rs_user = Nothing<br />%&#62;</p>
</div>
<p>bye</p>
<p>Roca</p>
]]></description>
        	        	<pubDate>Wed, 18 Aug 2010 18:00:35 +0300</pubDate>
        </item>
</channel>
</rss>