August 19th, 2005

Archie Milk

Joie de Vivre

I picked up a new sketchbook last night. I hope to get some good use out of it.

Still no punchline for Monday, but I'm workin' on it.

I've gotta remember to use my con bounce energy to prepare for the next con, so I don't end up doing everything two weekends before again. (In other words, I need to finish my con prep this weekend.)

Unfortunately, I need to go bang my head on a brick wall get to work now. CYA.

-The Gneech
  • Current Mood
    awake awake

Nice Work, Mr. Kludgy McSpaghetticode!

So I'm staring at this project, two weeks overdue and a source of never-ending pain since my return from AnthroCon, trying to puzzle out why, why, WHY DOES THIS THING STILL NOT WORK???

Suddenly, I spot it.

There's this procedure, see, where I pass the database a record ID and some data to write. If this is a new record, I send a 0, otherwise, an existing ID. The database, as programmed by the folks upstairs, then either creates a new record or updates an existing one, as appropriate, and sends me back the new record ID (either a completely new value for a new record, or just echoing back the ID I sent them, for an existing record). I then take this new ID and use it to do all sorts of fascinating other procedures tied to that record.

Pretty basic sort of programming stuff, right? So you might think!

Little did I know that the db folks, for reasons known only to them (if indeed they know themselves), aren't following this plan, at least, not all of it. It turns out that if the record exists already, instead of spitting out the existing record ID, they're sending me back a value of "".

So my procedures are creating/modifying/generally tinkering with all sorts of orphan data now, because it never once occurred to me that I might be sending my procedures a value of "". I assumed, like a chump, that I was sending proper record IDs!

Well, it's an easy enough thing to fix once the problem is diagnosed. A straightforward:

     if VARIABLES.recordID IS ""
     set VARIABLES.recordID = FORM.recordID

...makes all of the rest of my procedures sing and dance like the celestial spheres! For want of these two little lines, my pages have been sending me nasty and arcane error messages, behaving in peculiar ways, and generally making your ever-lovin' blue-eyed Gneech's life hell. Arrgh!

Well, as you can imagine, I'm tremendously relieved now, and positively beaming with energy and goodwill towards one and all ... with the possible exception of the DB guy upstairs who neglected to TELL me that the procedure wasn't working as advertised.


Among other things, I'm hoping that getting this weight off of my mind will free up my creativity a bit, so I can come up with Monday's punchline, do some heavy-duty scripting, and generally start doing art again like a bat out of hell. I sure could use the boost!

-The Gneech
  • Current Mood
    rejuvenated rejuvenated