Click here to Skip to main content
15,889,462 members
Home / Discussions / C#
   

C#

 
QuestionDBGhelp.dll read minidump Pin
Zach.Saunders17-Dec-11 9:04
Zach.Saunders17-Dec-11 9:04 
AnswerRe: DBGhelp.dll read minidump Pin
Eddy Vluggen18-Dec-11 1:40
professionalEddy Vluggen18-Dec-11 1:40 
QuestionText capture Pin
mmda17-Dec-11 4:47
mmda17-Dec-11 4:47 
AnswerRe: Text capture Pin
Luc Pattyn17-Dec-11 4:54
sitebuilderLuc Pattyn17-Dec-11 4:54 
QuestionPerformance issue with TableAdapter? Pin
MarkB12317-Dec-11 1:30
MarkB12317-Dec-11 1:30 
AnswerRe: Performance issue with TableAdapter? Pin
Dan Mos17-Dec-11 1:44
Dan Mos17-Dec-11 1:44 
GeneralRe: Performance issue with TableAdapter? Pin
MarkB12317-Dec-11 1:57
MarkB12317-Dec-11 1:57 
AnswerRe: Performance issue with TableAdapter? Pin
Dan Mos17-Dec-11 2:38
Dan Mos17-Dec-11 2:38 
There is nothing stopping you to do that directly in sql while still using paging.
Here's a simple example of SQL:

SQL
Create PROCEDURE spGetAllEmployee
	(
	@startIndex		int,
	@pageSize		int,
	@sortBy		nvarchar(30),
	@totalEmployees	int OUTPUT		
	)
AS
	SET NOCOUNT ON 

 DECLARE
    @sqlStatement nvarchar(max),    
    @upperBound int

  IF @startIndex  < 1 SET @startIndex = 1
  IF @pageSize < 1 SET @pageSize = 1
  
  SET @upperBound = @startIndex + @pageSize
 

 Select @totalEmployees=Count(*) From Employee
  
  SET @sqlStatement = ' SELECT E.EmployeeID, E.EmployeeCode, E.Name, E.Department, E.Salary
                FROM (
                      SELECT  ROW_NUMBER() OVER(ORDER BY ' + @sortBy + ') AS rowNumber, *
                      FROM    Employee
                     ) AS E
                WHERE  rowNumber >= ' + CONVERT(varchar(9), @startIndex) + ' AND
                       rowNumber <  ' + CONVERT(varchar(9), @upperBound)
  exec (@sqlStatement)


Taken from this article.

Sure it's for ASP but you can adapt. The idea was that you create dynamic grouping/sorting/filtering...
while still using paging.

Else, try loading the data using a data reader, as I said it should be faster. No guaranties though.
Smile | :)
All the best,

Dan

GeneralRe: Performance issue with TableAdapter? Pin
MarkB12317-Dec-11 3:22
MarkB12317-Dec-11 3:22 
AnswerRe: Performance issue with TableAdapter? Pin
Dan Mos17-Dec-11 6:12
Dan Mos17-Dec-11 6:12 
GeneralRe: Performance issue with TableAdapter? Pin
PIEBALDconsult17-Dec-11 3:24
mvePIEBALDconsult17-Dec-11 3:24 
GeneralRe: Performance issue with TableAdapter? Pin
MarkB12317-Dec-11 9:01
MarkB12317-Dec-11 9:01 
AnswerRe: Performance issue with TableAdapter - Break through? Pin
MarkB12317-Dec-11 8:09
MarkB12317-Dec-11 8:09 
GeneralRe: Performance issue with TableAdapter - Break through? Pin
MarkB12317-Dec-11 8:24
MarkB12317-Dec-11 8:24 
GeneralRe: Performance issue with TableAdapter - Break through? Pin
Dan Mos17-Dec-11 9:37
Dan Mos17-Dec-11 9:37 
GeneralRe: Performance issue with TableAdapter - Break through? Pin
BillWoodruff17-Dec-11 11:33
professionalBillWoodruff17-Dec-11 11:33 
GeneralRe: Performance issue with TableAdapter - Break through? Pin
MarkB12317-Dec-11 12:10
MarkB12317-Dec-11 12:10 
QuestionConvert Given string to If statment Pin
cacampa16-Dec-11 23:55
cacampa16-Dec-11 23:55 
GeneralRe: Convert Given string to If statment Pin
harold aptroot17-Dec-11 0:47
harold aptroot17-Dec-11 0:47 
GeneralRe: Convert Given string to If statment Pin
BillWoodruff17-Dec-11 1:52
professionalBillWoodruff17-Dec-11 1:52 
AnswerRe: Convert Given string to If statment Pin
Dan Mos17-Dec-11 0:50
Dan Mos17-Dec-11 0:50 
AnswerRe: Convert Given string to If statment Pin
Richard MacCutchan17-Dec-11 1:34
mveRichard MacCutchan17-Dec-11 1:34 
AnswerRe: Convert Given string to If statment Pin
BillWoodruff17-Dec-11 1:49
professionalBillWoodruff17-Dec-11 1:49 
AnswerRe: Convert Given string to If statment Pin
Manfred Rudolf Bihy17-Dec-11 2:23
professionalManfred Rudolf Bihy17-Dec-11 2:23 
GeneralRe: Convert Given string to If statment Pin
thatraja17-Dec-11 2:51
professionalthatraja17-Dec-11 2:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.