473,406 Members | 2,208 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

SQL, XML, Nested Datagrids and the like

Hello,

First, I apologize for the cross group posting.

I have a calendar to create in ASP.Net, using VB. Basically, the calendar
will display each event, and each event has a list of dates. For Example:

Event 1
date1, date2, date3,

Event 2
date1, date2, date3

and so on....

Here's how I would do it:

Create the event datagrid and load it with all of the events. Each event
will have a datagrid within itself and load that with the appropriate dates.
This works, as I've done it elsewhere, and it looks good. But is it the best
way? Here's my problem with it. When a user hits this page, there will be
one request to SQL for the event list, and then individual requests for each
event to pull the dates. This could reach 15 events for a page, so we're
looking at 16 queries to SQL just for a single page, PER USER! It just feels
like a lot of traffic, doesn't it?

I'm wondering if I can pull the entire single query in XML, then parse and
read it out as one object, one request, for the entire page. If I can, can
you provide some sort of guide or tutorial on how to do it. Or some sample
code. I've worked with some XML (rss and web services) but never had to
create a datagrid from it. Any help is GREATLY appreciated!

Thanks a ton!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com


Nov 19 '05 #1
1 1132
The "just parse and read it" referring to the XML file might be a lot of
work... not sure how you'd actually bind your grids to populate them (or if
you'd have to write a bunch of code to get the data into the grids).

A more traditional approach, and one that might be more straight-forward,
would be to load all of your event information into a DataSet (which can be
thought of as more or less a full-blowd database in memory). The DataSet
contains individual DataTable objects - possibly explicitly related to each
other. You can bind your grids to those DataTables as necessary. To get away
from a bunch of DB hits you could populate your dataSet and then stick it in
the Cache object. The next user comes along and you retrieve the data from
the cached DataSet (no hit against the DB). This would be one possible way
that might make sense if the underlying data changes infrequently.

Just remember that the Cache can get blown away by the system as necessary -
so you'd have to have logic that first attempts to find the DataSet in the
Cache... uses it if it's there... otherwise hits the db to populate it (then
sticks it into the Cache for possible future use). You'd also have to have
some way to refresh the data in the Cache when the data in the underlying db
changes.

-HTH


"David Lozzi" <Da********@nospam.nospam> wrote in message
news:ub*************@tk2msftngp13.phx.gbl...
Hello,

First, I apologize for the cross group posting.

I have a calendar to create in ASP.Net, using VB. Basically, the calendar
will display each event, and each event has a list of dates. For Example:

Event 1
date1, date2, date3,

Event 2
date1, date2, date3

and so on....

Here's how I would do it:

Create the event datagrid and load it with all of the events. Each event
will have a datagrid within itself and load that with the appropriate
dates. This works, as I've done it elsewhere, and it looks good. But is it
the best way? Here's my problem with it. When a user hits this page, there
will be one request to SQL for the event list, and then individual
requests for each event to pull the dates. This could reach 15 events for
a page, so we're looking at 16 queries to SQL just for a single page, PER
USER! It just feels like a lot of traffic, doesn't it?

I'm wondering if I can pull the entire single query in XML, then parse and
read it out as one object, one request, for the entire page. If I can, can
you provide some sort of guide or tutorial on how to do it. Or some sample
code. I've worked with some XML (rss and web services) but never had to
create a datagrid from it. Any help is GREATLY appreciated!

Thanks a ton!

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Eddie B. | last post by:
Is it possible to do nested datagrids for Windows Forms?
2
by: DelphiBlue | last post by:
I have a Nested Datagrid that is using a data relations to tie the parent child datagrids together. All is working well with the display but I am having some issues trying to sort the child...
0
by: Bob Hoke | last post by:
I am trying to do some of the things we used to do in classic ASP that required some pretty ugly loops in the .ASP page. I have two different DataSets that each have a DataView that I can change...
1
by: Dave | last post by:
I have a datagrid with another datagrid in a template column. For the second datagrids datasource I use container.dataitem.createchildview("relationship") I want to discover if the nested...
3
by: John Jasobs | last post by:
I know this has been asked before but I have not seen it answered. How would one implement nested datagrids in windows forms based on the table relationships within a dataset? Or, is there some...
1
by: Neil | last post by:
Does anyone know where there is some examples of nested datagrids in vb.net not using ASP.net or Does anyone know how to link using nested datagrids in vb.net not using ASP.net (eg where...
0
by: edgarecayce | last post by:
I would like to implement a drill-down report using the ASP.NET datagrid. From what I have read online, a way to do this is to have a user control that implements the second-level data when you...
6
by: Steve Hershoff | last post by:
Hi everyone, I've got a strange one here. There are two datagrids on my page, one nested within the other. I'll refer to them as the topmost and secondary datagrids. In the topmost...
2
by: jobs | last post by:
I have two Nested repeating Datalists with different data sources. Currently the second Datalist is set to visible=false I have an oncommand button on the first, that when selected I would...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.