(no subject)
My last few entries are mostly whinging and complaints because the thing that's been taking over my life currently - TEH_SEKRIT_PROJEKT - cannot be talked about. So not much happening in my life other than that. That being said, on to [Unknown site tag]today's ASP whinge
OK, the primary reason I post in my journal about coding problems is that I've discovered that often the act of writing the problem down helps me fix it. Of course, it's got to be actually sent *to* someone; I can't just type it into a random document on my computer, it seems that there must be someone to be annoyed on the other end for it to work. [1] I don't think LJ works quite as well as annoying my friend Toby,[2] but it'll have to do.
Anyway, the current problem is that in this calendar app I'm working on, it works perfectly for days that have entries on the calendar. But when there's a day *without* any entries, it throws an error when closing the recordset:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/www/sfolse/calendar_test2.asp, line 231
This is line 231: objRS2.Close
objRS2 is created for the query that pulls the events from the database, and the events on days that have them display just fine, it's just on days with no event, so that there are no records in the recordset.
I'm thinking that it's panicking because there are no records in the recordset, but I can't figure out why it would do that, and there don't seem to be any explanations in my books or online that say "If your recordset is empty, do XXX." So it's entirely possible I'm wrong.
[1] I think that it probably has to do with forcing myself to explain it all from the beginning when writing to another person - when writing for myself, I bet I take shortcuts or something that keep me from being able to work through the logic.
[2] Toby: Why are you asking me this? You know more PHP than I do!
Me: Shut up. That's not the point.
OK, 5:00, time to go home and plunge back into TEH_SEKRIT_PROJEKT
OK, the primary reason I post in my journal about coding problems is that I've discovered that often the act of writing the problem down helps me fix it. Of course, it's got to be actually sent *to* someone; I can't just type it into a random document on my computer, it seems that there must be someone to be annoyed on the other end for it to work. [1] I don't think LJ works quite as well as annoying my friend Toby,[2] but it'll have to do.
Anyway, the current problem is that in this calendar app I'm working on, it works perfectly for days that have entries on the calendar. But when there's a day *without* any entries, it throws an error when closing the recordset:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/www/sfolse/calendar_test2.asp, line 231
This is line 231: objRS2.Close
objRS2 is created for the query that pulls the events from the database, and the events on days that have them display just fine, it's just on days with no event, so that there are no records in the recordset.
I'm thinking that it's panicking because there are no records in the recordset, but I can't figure out why it would do that, and there don't seem to be any explanations in my books or online that say "If your recordset is empty, do XXX." So it's entirely possible I'm wrong.
[1] I think that it probably has to do with forcing myself to explain it all from the beginning when writing to another person - when writing for myself, I bet I take shortcuts or something that keep me from being able to work through the logic.
[2] Toby: Why are you asking me this? You know more PHP than I do!
Me: Shut up. That's not the point.
OK, 5:00, time to go home and plunge back into TEH_SEKRIT_PROJEKT
no subject
no subject
no subject
no subject
no subject
no subject
I can't even get IF [IF NOT] (objRS2.BOF AND objRS2.EOF) THEN [blah] to work, in any permutation. It's just totally not creating the recordset object if there's no records, instead of returning a recordset object with 0 rows.
You know, a few months from now, maybe even jsut a week from now, I'll be looking back on this and going "But that's so /easy/! Why didn't you see it?" but for now ... aarg.