G
Guest
I need to accomplish this tasks:
1. i need to query sql database
2. check if null, if not continue
3. check a certain column if null,if not continue
4. filter or split the data into two sets, these 2 will be the datasources
of two gridview.
i can use datareader to query sql database, check if its null (using
datareader.hasrows), and check if certain column if null; however i cant use
datareader to filter rows into 2 sets. To achieve this, datatable has select
method or dataview has rowfilter method. Now how do i transfer data from
datareader to datatable or dataset/dataview? As much as possible i want a
single database query so the web app will be faster.
Thanks.
1. i need to query sql database
2. check if null, if not continue
3. check a certain column if null,if not continue
4. filter or split the data into two sets, these 2 will be the datasources
of two gridview.
i can use datareader to query sql database, check if its null (using
datareader.hasrows), and check if certain column if null; however i cant use
datareader to filter rows into 2 sets. To achieve this, datatable has select
method or dataview has rowfilter method. Now how do i transfer data from
datareader to datatable or dataset/dataview? As much as possible i want a
single database query so the web app will be faster.
Thanks.