Hmm. Personally I would use XML as you wouldn't need an overly complicated file to achieve a datasource for this particular application. In any case, ill foucs on using a database since you have indicated that XML is a bit complicated for you at present.
How you setup the database largely depends on what you are comfortable with but this is how I would do it.
Table: Event_Dates
Fields: pk (int, auto inc, no dupes), eventDate (datetime)
Table: Events
Fields: pk(int, auto inc, no dupes) event_fk (int), eventName (varchar) eventDescription(varchar)
This gives you a Many-to-one relationship (one date could potentially have many events) from the Event_dates table to the events table.
You link an event to a particular date based upon the event_dates.pk and events.event_fk relationship and to do so your query may look something like:
SELECT eventName, eventDescription FROM events where event_fk = (SELECT pk FROM event_dates where Convert(varchar(10), eventDate, 101) = '04/03/2007')
This query works but also contains a pitfall. If you do a straight insert into the Event_dates table without first checking to see if the date you are trying to insert already exists, the above query will throw an error to the effect of: Subquey can only contain one result.
And really, you should never need to have more then one instance of each date in the database but, if you would have a need to have multiple instances, you could rewrite your query to this:
SELECT eventName, eventDescription FROM events where event_fk IN (SELECT pk FROM event_dates where Convert(varchar(10), eventDate, 101) = '04/03/2007')
hth.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========