"William (Tamarside)" wrote:
> Well thank you so much for absolutely nothing! And here I thought
> Google Groups was a community where one could ask others for help.
First of all, this isn't "Google Groups." This is the Usenet. Google just
gives you one of *many* ways to read (and write) UseNet messages. (For
example, I happen to be using one provided by
www.microsoft.com, right now.
And if your ISP has the feeds, Outlook Express has a news reader/writer built
in.)
And, yes, you can ask others for help. But when you just toss code at us
and say "it doesn't work" with no explanation of *what* doesn't work or what
you have tried or what debug you have done... Well, sorry, but you are just
asking for the kind of advice that both Evertjan and I gave you. Which is,
quite honestly and without trying to be mean or nasty, that you should dump
that junky old code and find better code.
> A couple of points, though:
> 2) The entire calendar works and works well, regardless of what you or
> I may think of the coding standards.
No, it doesn't "work well".
(a) It obviously doesn't work well or you wouldn't have posted the question.
(b) Even if it sort of works, it doesn't "work well" because it is using the
horrible horrible practice of making one "hit" to the DB for every date in
the calendar! Okay, maybe that doesn't matter in your inTRAnet system,
where server performance is likely not an issue. But it's really really
stretching it to say it "works WELL". "Works"? Okay. "Well"? Sorry, but
no way.
> 3) The problem I have is with the SQL query, as I don't get all the
> dates where I know there are bookings.
So why didn't you say that in the first post?
And what debugging have you done to see just what you *are* getting from the
SQL query?
And what does the data inside the DB table look like?
> 4) Next time you intend to be a smart-arse, try writing code in VB.Net
> to allow for integration between Active Directory, Exchange, MOSS07
> and two 3rd party apps.
Well, if you can really do all that, then why are you using this ancient
junky ASP calendar?? ASP.NET has a calendar control included. And there are
tons of examples on the 'net on using that control. Mind you, I'm not all
the enamored of the way even that control works, because it, too, makes a
"filter" request on a DataTable for each date displayed. But at least it's
not a complete DB hit each time.
> 5) Being nice to people costs nothing, so when people ask for help,
> either offer help or stay quiet.
But don't forget that asking *organized* questions, rather than just "this
doesn't work" and tossing code over the wall, costs nothing, too.
Quite frankly, looking again at that code, I still don't see what the
problem is. And I don't think I could find out unless I had your DB and the
code in my hands. Or unless you started doing some debugging and said
specifically "when the record in the DB contains x and y then it works, but
not with z" (or something like that). But even so, then, there's no way I'd
let that code stand, as is.