.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ADO.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Why I cannot find SqlCommand.ExecutePageReader? What happen? If it function cut, how to make page

Posted By: RAJ     Posted Date: June 01, 2011    Points:5   Category :ADO.Net
please tell me the answer with example

Author: SureshM             
Posted Date: June 08, 2011     Points: 20   

Hi Raj,

When did you find execution method like "SqlCommand.ExecutePageReader" ? I didn't see like this methods..

Author: RAJ             
Posted Date: June 09, 2011     Points: 20   

this method used for "data paging" concept that is introducing ADO.NET 2.0.

string connectionString = ..; //some connection string

SqlConnection sqlConnection = new SqlConnection(connectionString);


SqlCommand sqlCommand = new SqlCommand("Select * from Employee", sqlConnection);

SqlDataReader sqlDataReader = sqlCommand.ExecutePageReader(CommandBehavior.CloseConnection, 1, 25);

but here ExecutePageReader method not visible while typing this code.
i mean can i import any namespace in the code.
which version of the .net support this method.how can i achieve this task please help me.
here executePageReader method takes 3 arguments commandbehavior,startindex(1),endindex(25)


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend