Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > General> How is LLBLGEN datasource2 paging working?
 

Pages: 1
General
How is LLBLGEN datasource2 paging working?
Page:1/1 

  Print all messages in this thread  
Poster Message
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 27-Dec-2010 07:26:07.  
Hello

there is one LLBLGEN datasource2 control and asp.net GridView on page.

EnablePaging = true in LLBLGEN datasource2

GridView:
AllowPaging = true
PageSize = 10

then i have used sql server profile to track sql:
the sql as below
Code:

exec sp_executesql N'SELECT COUNT(*) AS NumberOfRows FROM (SELECT [csb].[dbo]....)) TmpResult',N'@CompanyId1 int,@IsDeleted2 bit',@CompanyId1=9,@IsDeleted2=0


Code:

exec sp_executesql N'SELECT [csb].[dbo]....',N'@CompanyId1 int,@IsDeleted2 bit',@CompanyId1=9,@IsDeleted2=0


the second sql will return all records, why paging doesn't work?
and "get count" sql has low performance. do we have another way to get count?

please advise.
any ideas will be appreciated.

envionment as below
.net framework 3.5
dnn 5.5.x
llblgen pro 2.6 (self-servicing mode)
iis7
sql server 2005

Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13710 posts
# Posted on: 27-Dec-2010 09:17:43.  
Please provide the llblgen pro runtime library version (build number).
check this forum guidelines thread to now how to get this number.


  Top
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 27-Dec-2010 09:57:44.  
June 6th,2008?
Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 27-Dec-2010 10:01:06.  
SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll - 2.6.8.804?

Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13710 posts
# Posted on: 27-Dec-2010 10:14:20.  
That's a too old, would you please try the latest build.
  Top
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 27-Dec-2010 10:21:59.  
yes,i will,

but current project is old project, and now it has low performance.
so, do you have any suggestions except upgrade llblgen pro?


Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
34702 posts
# Posted on: 27-Dec-2010 12:13:32.  
It doesn't necessarily mean all rows are returned: it might be paging takes place on the client (reading X rows from the datareader, then close it), because 'distinct' wasn't applyable. This happens if a field in your resultset is of type Image, NText or Text. Could you check that, please?

Also, if you switch off livepersistence and implement the event handlers instead (see documentation for an example), please check whether the pagenumber/size parameters are indeed set.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13710 posts
# Posted on: 27-Dec-2010 15:40:55.  
Quote:
so, do you have any suggestions except upgrade llblgen pro?

It's not an upgrade in it's full sense. But rather an update.
I was asking to use the latest build of the same version (v.2.6).


  Top
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 27-Dec-2010 15:40:56.  
Hello

currently AllowDuplicates="False"
and there is one field "Details" type is NText.

but why this field will cause no paging in SQL?

livepersistence = true
and there is no events.

as i think, if paging takes place on the client ,it has low performance than paging takes place in SQL.
Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13710 posts
# Posted on: 28-Dec-2010 10:02:04.  
Quote:
but why this field will cause no paging in SQL?


Ans:
Otis wrote:
because 'distinct' wasn't applyable. This happens if a field in your resultset is of type Image, NText or Text


  Top
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 28-Dec-2010 10:07:49.  
Hello

sorry for misunderstanding.

i have disabled "AllowDuplicates" , now, AllowDuplicates="False"
but there is no "distinct " in SQL, why?

thank you again.
Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13710 posts
# Posted on: 28-Dec-2010 10:14:57.  
Distinct can't be applied to a query if the select list has fields of blob types (like Text and Image types).

  Top
nevernet
User



Location:

Joined on:
01-Feb-2010 13:21:09
Posted:
67 posts
# Posted on: 28-Dec-2010 10:17:28.  
Oh,clear

thank you very much
Dev Environment as below:
.Net 3.5, LLBLGen Pro 2.6, SQLServer 2008, IIS7
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.