By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,792 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

best way to display resultset?

P: n/a
I need to display some 200 records (dynamic) on the screen..

I need to display records from 2 tables (one to many relationship)

output would look like
Customer Id Name Phone NO
1 abc 23949495
34945959

2 xyz 39595699

3 fhg 34858686
34585689

This will be a read only grid.
which is the best approach?

1) use datareader or dataset to get the data from database.
2) use server controls like datagrid/datalist/data repeater or generate html
table dynamically?

can you discuss the pros and cons of each of these?

I am not sure how the phone no part (from a diff resultset) be implemented..

one way, i can think of is,, iterate thru first resultset and generate html
table and for each row, query the second resultset and display the relevant
contents. is there any other better way?

Regards,
Augustin
Sep 25 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Why cant you join the data in the SQL so that you have one dataset? It is
likely to be a simple enough statement.

With a single dataset it will be about 10 lines of code to obtain the
dataset, bind to a datgrid and implement pagination (or probably none if you
use visual studio's designer).

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
"Augustin Prasanna" <Au**************@hotmail.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>I need to display some 200 records (dynamic) on the screen..

I need to display records from 2 tables (one to many relationship)

output would look like
Customer Id Name Phone NO
1 abc 23949495
34945959

2 xyz 39595699

3 fhg 34858686
34585689

This will be a read only grid.
which is the best approach?

1) use datareader or dataset to get the data from database.
2) use server controls like datagrid/datalist/data repeater or generate
html table dynamically?

can you discuss the pros and cons of each of these?

I am not sure how the phone no part (from a diff resultset) be
implemented..

one way, i can think of is,, iterate thru first resultset and generate
html table and for each row, query the second resultset and display the
relevant contents. is there any other better way?

Regards,
Augustin


Sep 25 '06 #2

P: n/a
Are you talking about using something like a 'Coalesce'?

Regards,
Augustin
"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:ge********************@eclipse.net.uk...
Why cant you join the data in the SQL so that you have one dataset? It is
likely to be a simple enough statement.

With a single dataset it will be about 10 lines of code to obtain the
dataset, bind to a datgrid and implement pagination (or probably none if
you use visual studio's designer).

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
"Augustin Prasanna" <Au**************@hotmail.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>>I need to display some 200 records (dynamic) on the screen..

I need to display records from 2 tables (one to many relationship)

output would look like
Customer Id Name Phone NO
1 abc 23949495
34945959

2 xyz 39595699

3 fhg 34858686
34585689

This will be a read only grid.
which is the best approach?

1) use datareader or dataset to get the data from database.
2) use server controls like datagrid/datalist/data repeater or generate
html table dynamically?

can you discuss the pros and cons of each of these?

I am not sure how the phone no part (from a diff resultset) be
implemented..

one way, i can think of is,, iterate thru first resultset and generate
html table and for each row, query the second resultset and display the
relevant contents. is there any other better way?

Regards,
Augustin



Sep 25 '06 #3

P: n/a
no - I'm talking about using a gridview from the .net 2.0 framework

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
"Augustin Prasanna" <Au**************@hotmail.comwrote in message
news:On**************@TK2MSFTNGP02.phx.gbl...
Are you talking about using something like a 'Coalesce'?

Regards,
Augustin
"John Timney (MVP)" <x_****@timney.eclipse.co.ukwrote in message
news:ge********************@eclipse.net.uk...
>Why cant you join the data in the SQL so that you have one dataset? It
is likely to be a simple enough statement.

With a single dataset it will be about 10 lines of code to obtain the
dataset, bind to a datgrid and implement pagination (or probably none if
you use visual studio's designer).

--
--
Regards

John Timney (MVP)
VISIT MY WEBSITE:
http://www.johntimney.com
"Augustin Prasanna" <Au**************@hotmail.comwrote in message
news:et**************@TK2MSFTNGP05.phx.gbl...
>>>I need to display some 200 records (dynamic) on the screen..

I need to display records from 2 tables (one to many relationship)

output would look like
Customer Id Name Phone NO
1 abc 23949495
34945959

2 xyz 39595699

3 fhg 34858686
34585689

This will be a read only grid.
which is the best approach?

1) use datareader or dataset to get the data from database.
2) use server controls like datagrid/datalist/data repeater or generate
html table dynamically?

can you discuss the pros and cons of each of these?

I am not sure how the phone no part (from a diff resultset) be
implemented..

one way, i can think of is,, iterate thru first resultset and generate
html table and for each row, query the second resultset and display the
relevant contents. is there any other better way?

Regards,
Augustin




Sep 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.