|
-
Nov 12th, 2010, 01:28 AM
#11
Re: Read date from database to monthcalendar
First up, you need to get your database design sorted. It's a very bad idea to have separate tables when the data is basically the same. You should absolutely not have a separate table for dates for each office. You should have a table for offices and a table for dates and each date record contains an office ID. You can then query the database for all dates with a specific office ID. You can read the results into a List(Of Date) using a DataReader and call ToArray or you can use populate a DataTable using a DataAdapter and use LINQ to get an array of Dates. Once you've got your array, you use just as you did in your original code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|