Thread: RE: Records being lost when binding to a repeater
RE: Records being lost when binding to
a repeater
United States
2007-07-25 08:55:47
I've never used Trace.Warn or Trace.axd.. I have used trace.write and no
errors occur. I also made session variables to see values. I can cleaerly
see with the trace on that the page in this case has 44 records... But since
it is under 50 for some reason it isn't showing any on the repeater control.
SQLstring
System.String
SELECT * FROM users WHERE(Not (userid Is NULL)) AND ([Gender] LIKE '%x%' OR
[Gender] = 'Female') And ([state] = 'PA') And ([country] = 'US') ORDER BY
LastVisit DESC
Searchlongitude
System.String
-79.541573
Searchlatitude
System.String
40.295383
Distance
System.String
38
IntUserCountTotal
System.Int32
44
pagedData.PageSize
System.Int32
50
TotalRecords
System.String
44
totalPages
System.Double
1
totalPagesToSearch
System.Double
0
As you can see the total records are 44 but the output is nothing to the
repeater. I have lowered the "pagedData.PageSize to 25 once and the records show on the page. But then things lower don't show etc..... somehow it
seems in Sub doPaging() that the records aren't bound......
_____
From: AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOkyahoogroups.com
[mailto: AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOkyahoogroups.com] On Behalf Of Charles Carroll Sent: Tuesday, July 24, 2007 10:07 PM
To: AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOkyahoogroups.com
Subject: Re: [AspNetAnyQuestionIsOk] Records being lost when binding to a
repeater
Why don't you use Trace.Write and Trace.Warn?
It can be combined with trace=true
trace.axd
and listeners to toggle seeing all this related data you need to see.
On 7/24/07, mbelcher <AspNetAnyQuestionIs
<mailto:AspNetAnyQuestionIsOk%40faroutcomputersystems.com>
Ok%40faroutcomputersystems.com">Okfaroutcomputersystems.com> wrote:
>
>
>
>
>
>
> Heres the funny part. If the records are more than 50 which is the
> "pagedData.PageSize = 50" then they will show up in the output. If it is
> less than 50 nothing shows up. Records are being lost somehow as I see it
in > the Sub doPaging() routine. I can see in the trace that it will show that
> the right amount of rows etc exist when it gets to Sub doPaging() but then
> some how they are not being bound or something as it doesn't seem to
output
> if under the pagedData.PageSize = 50 . any ideas.. >
> Function getTheData() As DataTable
>
> Dim strSQLstring
>
> strSQLstring = Session("SQLstring")
>
> 'Open the Connection ------------------------------------- >
> Dim objConn As SqlConnection
>
> Dim objConnString As String = "Data Source=localhost;Initial
> Catalog=dating;User Id=xxxxxxx;Password=xxxxxx;"
>
> objConn = New SqlClient.SqlConnection(objConnString) >
> objConn.Open()
>
> 'NEW STUFF 5/1/2007 MBELCHER
>
> Dim dt1 As New DataTable("users") >
> Dim adapter As New SqlDataAdapter(strSQLstring, objConn)
>
> adapter.Fill(dt1) >
> 'Distance holder
>
> Dim myDistance As Integer >
> Dim Distance
>
> Dim mySearchDistance 'user max distance
>
> Dim IntCurrentRowUserID As Integer >
> Dim strCurrentRowUser
>
> Dim strCurrentRowCountry
>
> Dim rowIndex As Integer >
> rowIndex = dt1.Rows.Count
>
> 'DEBUG
>
> Response.Write("<b>USERS FOUND" & " <BR><BR></b>")
>
> Dim IntUserCount As Integer >
> Dim IntUserCountTotal As Integer >
> IntUserCount = 0
>
> IntUserCountTotal = 0
>
> Response.Write("<B> BEGINNING dt1.Rows.Count</b> = " &
> dt1.Rows.C