R
Rujuta Gandhi
Hi Everybody,
I have one question related to pageddatasource control available in the .net
whidbey.
I want to know that if the paged datasource is assgned its index and
pagesize and then after it will be assgned to a datasource having 1 million
records what will be memory used by paged datasource. Whether it will load
only records equal to page size specified or all the 1 million records
..I have 1 million records in textbook table. And I want ot make efficient
use of memory by using some means available in .net controls. I m using SQL
server 2000, and there is nothing like rownum like oracle is there in the
this version of SQL. So I dont know how to get only 10 records for display
from the SQL server. If there is some control available in .net framework
which can perform this task for me I want ot know.
At present I m working with code as follows. This code is just snippet to
give the idea what i m doing at present. But I want to know is that whether
this will load all one million records in memory or just 10 ercords will be
loaded as I have specified in pagesize of Pageddatasource. All I want to do
is just efficient use of server's memory and I dont want to hang it up
because of 100 requests of 1 million records with good speed.
If Any one is having any idea by which this problem can be solved please
share with me.
code:
PagedDataSource cPagedDataSource= new PagedDataSource();
cPagedDataSource.AllowPaging = true;
cPagedDataSource.PageSize = 10;
cPagedDataSource.CurrentPageIndex = 3;
SqlConn = new SqlConnection();
SqlConn.ConnectionString =
ConfigurationSettings.ConnectionStrings["AppConnectionString1"].ConnectionSt
ring;
DataSet ds = new DataSet();
SqlConn.Open();
try
{
SqlDataAdapter da = new SqlDataAdapter("SELECT * from textbook", SqlConn);
da.Fill(ds, "textbook");
}
finally
{
SqlConn.Close();
}
cPagedDataSource.DataSource = ds;
If I m not clear at any point please feel free to ask.
ruju
I have one question related to pageddatasource control available in the .net
whidbey.
I want to know that if the paged datasource is assgned its index and
pagesize and then after it will be assgned to a datasource having 1 million
records what will be memory used by paged datasource. Whether it will load
only records equal to page size specified or all the 1 million records
..I have 1 million records in textbook table. And I want ot make efficient
use of memory by using some means available in .net controls. I m using SQL
server 2000, and there is nothing like rownum like oracle is there in the
this version of SQL. So I dont know how to get only 10 records for display
from the SQL server. If there is some control available in .net framework
which can perform this task for me I want ot know.
At present I m working with code as follows. This code is just snippet to
give the idea what i m doing at present. But I want to know is that whether
this will load all one million records in memory or just 10 ercords will be
loaded as I have specified in pagesize of Pageddatasource. All I want to do
is just efficient use of server's memory and I dont want to hang it up
because of 100 requests of 1 million records with good speed.
If Any one is having any idea by which this problem can be solved please
share with me.
code:
PagedDataSource cPagedDataSource= new PagedDataSource();
cPagedDataSource.AllowPaging = true;
cPagedDataSource.PageSize = 10;
cPagedDataSource.CurrentPageIndex = 3;
SqlConn = new SqlConnection();
SqlConn.ConnectionString =
ConfigurationSettings.ConnectionStrings["AppConnectionString1"].ConnectionSt
ring;
DataSet ds = new DataSet();
SqlConn.Open();
try
{
SqlDataAdapter da = new SqlDataAdapter("SELECT * from textbook", SqlConn);
da.Fill(ds, "textbook");
}
finally
{
SqlConn.Close();
}
cPagedDataSource.DataSource = ds;
If I m not clear at any point please feel free to ask.
ruju