best way to display resultset?

A

Augustin Prasanna

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
 
J

John Timney \(MVP\)

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
 
A

Augustin Prasanna

Are you talking about using something like a 'Coalesce'?



Regards,
Augustin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top