?
Solved

asp.net C#, paging

Posted on 2010-01-04
3
Medium Priority
?
1,890 Views
Last Modified: 2012-05-08
Exception Details: System.NotSupportedException: The data source does not support server-side data paging.

Source Error:

Line 97:
Line 98:         gridsearch.DataSource = reader;
Line 99:         gridsearch.DataBind();
Line 100:
Line 101:        reader.Close();
0
Comment
Question by:shpresa
3 Comments
 
LVL 4

Accepted Solution

by:
fsouzabrasil earned 2000 total points
ID: 26173823
You have made the same mistake the datasource is an "OdbcDataReader" and a Reader don't support paging. Fill first a DataSet or DataTable and bind it then as DataSource.

DataTable oDt = new DataTable();
oDt.Load(reader);
gridsearch.DataSource = oDt;
gridsearch.DataBind();
reader.Close();
0
 

Author Comment

by:shpresa
ID: 26173923
Great! Worked fine. Thanks a bunch
0
 
LVL 12

Expert Comment

by:williamcampbell
ID: 26173981
If your Obj ectDataSource SELECT method doesnt return a DataSet or a DataReader, youll get the above
runtime error. Are you using Multiple tables and INNER JOINS etc?

Take a look at this page it may have the answer:

http://msdn.microsoft.com/en-us/library/aa479347.aspx

wc
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question