|
 |
aspx thread: - Application & Session varialbes
Message #1 by NK Ramanathan <nkram2000@y...> on Mon, 19 Mar 2001 01:39:54 -0800 (PST)
|
|
Hi All,
Is there any disadvantage in using ASP.Net
Application, Session Variables to maintain state.
I need to get data from say three tables.
One way i can go about is fetch the data as needed,
three database hits for three tables.
The other way is when i hit the database for the first
table get the other two also minimizing the
database hits to one.
Am i wrong some where. Is this(minimizing database
hits to one) not possible in ADO.Net due to the
disconnected
nature of recordsets, rather datasets in ADO.Net.
Is it possible to read data in batches. i.e. get data
from two or more tables in one shot.(The queries are
still 2 in No. and it is not a single query)
If possible how?
Thanks in Advance.
Regards,
Ramanathan N.K.
Message #2 by "Mike Amundsen" <mike@a...> on Mon, 19 Mar 2001 06:23:21 -0500
|
|
depending on the size of the three tables, you might want to get all three
and place them in the same DataSet object and then build Relations for the
three tables. Then marshall the dataset to the page where you can easily
sort, select, etc. the data without going back to the DB.
Again, all depends on the size of the tables. If you have only a few
hundred in each, this might be a good solution. But if you have thousands
of recs, this would probably be overkill.
MCA
-----Original Message-----
From: NK Ramanathan [mailto:nkram2000@y...]
Sent: Monday, March 19, 2001 4:40 AM
To: ASP+
Subject: [aspx] - Application & Session varialbes
Hi All,
Is there any disadvantage in using ASP.Net
Application, Session Variables to maintain state.
I need to get data from say three tables.
One way i can go about is fetch the data as needed,
three database hits for three tables.
The other way is when i hit the database for the first
table get the other two also minimizing the
database hits to one.
Am i wrong some where. Is this(minimizing database
hits to one) not possible in ADO.Net due to the
disconnected
nature of recordsets, rather datasets in ADO.Net.
Is it possible to read data in batches. i.e. get data
from two or more tables in one shot.(The queries are
still 2 in No. and it is not a single query)
If possible how?
Thanks in Advance.
Regards,
Ramanathan N.K.
|
|
 |