Archive for November, 2003

Under the Knife

In about an hour and a half, I’ll be having surgery. It’s a minor, outpatient procedure, that involves putting me under general anesthesia. I’ll probably be too groggy to do much afterwards, but later in the week I’m planning to add a few things to the site while I’m convalescing.

For one thing, I’m working on pinging index sites like Weblogs.com, using Tatsuhiko Miyagawa’s ping_weblogs_com_rpc plugin. Unfortunately, my host doesn’t provide the required XMLRPC::Lite perl module. My next host will definately have shell access.

See you on the other side.

Rantlets

Random rantage, assorted annoyances, miscellaneous mumblings.

  • Updates to Mail.app in Panther include some new sound effects. There is a new ‘mail sent’ sound, like a swoosh or airplane taking off; there’s also a ‘no new mail’ sound (played only if you asked for mail check manually) that’s a charming mix of fingers on a blackboard and the shower scene from Psycho. In Mail’s preferences dialog, you can change the new mail sound (just as you could in Jaguar), but you can’t change any of the other sounds. You can only turn ‘other sounds’ on or off. That’s just lazy and sloppy.
  • If you’re going to bother inserting ads in a webpage, use a permalink. Ads on Macintouch are tasteful and subtle (one line of text, in a colored box, inline in the articles), but when I saw one today for something I was interested in, the link took me to the advertiser’s home page, not to the product mentioned in the ad. I searched and found the product is still caried and in stock (just out of curiosity as to why the link failed), but they lost a potential sale.
  • Firebird 0.7.1 has been bugging me lately. Granted, it’s beta, but this is just one of those things I keep noticing. I use the status bar, so I can hover a link and see where it goes before deciding to click. I also tend to maximize my Firebird window. At this point, if I click a link from another app (like NetNewsWire) which opens a new window, it’s top-left corner is tiled over and down from my existing window. Since the existing window was maximized, the new window is the same size; but since the new window is tiled down, the status bar is now off the bottome of the screen.
  • Speaking of status bars, Mail.app doesn’t have one. It claims to, but this is the info bar between the mail list and the preview pane. I need a real status bar, at the bottom of the window, so I can hover links and see where they go. Or show me this info as a tooltip. Don’t make me click blind.
  • Football coverage on CBS is just plain painful. Greg Gumble has got to be the worst commentator I have ever heard. Thank goodness the Eagles games are usually covered on Fox. Go Birds.

And Now For Something Completely Different…

Just becuase I don’t have enough diverse (and conflicting) interests, I’m currently learning Python. So far I like what I see. My only gripe is that the version of Python 2.3 Apple shipped with Panther does not support command line editing. In other words, in interactive Python, you can’t use up-arrow to access a command history (you have no history, except cut-and-paste, which means hands off the keyboard/on to the mouse), or use left-arrow to edit the current line (delete ’em and weep). I’m pretty sure that this can be compiled into Python, I don’t understand why Apple didn’t.

Also of note, I’m learning Python via Learning Python (go figure), which I’m reading via Safari Bookshelf. Although I really like dead tree editions, and generally prefer reading hardcopy to electronic copy, I have to admit that it’s working out pretty well. It’s especially a good choice for this book, for two reasons. The second edition is due out next month… no sense spending the money for a hardcopy of the current edition. Also, I’m working through many of the exercises in the book, so I’m at the keyboard anyway. I originally signed up for Bookshelf as a way to keep reference books at hand and audition books to buy, but so far reading a whole book online is working well.

Worst. Bugfix. Ever.

I hope that none of you ever, ever have to deal with Sybase ASE ODBC/ADO drivers. Nevertheless, I’m going to document a bug (and a fix/workaround) for using Sybase with Microsoft ADO, because I still can’t believe it.

I first used ADO against a Sybase server about 6 years ago, on a major website project. Over the years, I (and other members of my team) have found that every version of the ADO/ODBC drivers has various issues when used with MSADO. Each new release of ADO and/or Sybase Drivers seems to change subtle behaviors in ADO. We did identify a single version (11.004, I think) that work exactly as it should. Subsequent versions had bugs, so we stuck with what worked.

We recently deployed all new webserver hardware for that original website project. It’s an important website, it processes $12-$15 Billion (yes, that’s a B) in transactions monthly. Needless to say, I spent alot of time installing and testing. Now, the server admins put a new version of the Sybase drivers on ther servers. I was hesitant, but was told that this version worked correctly. And in my testing, it did.

Until we deployed. Seems there was one function I didn’t test, which used ADO‘s .UpdateBatch() against a Recordset opened with a client-side cursor. Shame on me for not testing it; nevertheless, the .UpdateBatch() was failing. Remembering similar issues from the bad-old days of driver shuffling, I tried switching to a server-side cursor. This fixed the problem. Unfortunately, it introduced another… the Sybase server side cursor doesn’t support Recordset filtering (and of course, the Client-side cursor library does).

So now, I was officially damned-if-I-do, damned-if-I-don’t. I immediately (well, right after some choice words) did what any good developer would do… I Googled. And lo, Google was good to me, for I found what I needed immediately. And I was shocked.

The post I found said that you could correct the ‘UpdateBatch failing on client-side cursors’ issue by adding the following line to your data source’s section of your ODBC.ini file:

WorkArounds2=24

Now, I don’t know if this affects the Sybase software or the Microsoft ADO software, but what we have here is a hack. An undocumented hack at that. Why this isn’t a configurable option on the ADO library or the OLEDB/ODBC driver is beyond me. But that’s not the worst part. The person who posted this nugget was in fact posting a solution to a problem they had themselves posted… and they found this answer in a newsgroup post from 1998. Why is this nasty hack still needed, five years later?

So, for the search engines, the above hack will fix and ADO failure cause when trying to run .UpdateBatch against a client-side (adUseClient) Recordset with Sybase ASE drivers. The error message is:

Run-time error '2147467259 (80004005)';
Data provider or other service returned an E-FAIL status.

You may also see a message that the error was raised by the Microsoft Cursor Engine. Also note, ODBC.ini now lives in the registry, at HKLM/Software/ODBC.ini.

More Firebird Coolness

If you use Firebird, and if you browse with tabs, you probably already know that you can drag tabs around the tab bar to resort them. But you can also drag a tab from one Firebird window to another, moving the page in that tab from one window to the other. If the tab was the last one in the window, the window will close. This is great for consolodating windows opened by other programs (like an aggregator or mail client) into a single window.