Inmagic date formats and regional settings

by Peter Tyrrell Tuesday, August 16, 2005 1:37 PM

Okay, I did some tests and this is the conclusion: in v7 of dbtext anyway, the dbtext.ini file can be given a short date format, BUT this is very misleading because although dbtext uses the dbtext.ini format to *stamp* the date (when automatic), the dbtext.ini format is completely ignored when the date is indexed. And when indexing, dbtext indexes the date as an unambiguous absolute. What does this mean? Let's say today is Feb 10, 2005. My machine's regional settings are M/d/yyyy. To my machine, Feb 10 2005 reads 2/10/2005 in short format. If I don't touch the dbtext.ini, any autodate in short format in dbtext is going to be stamped in as 2/10/2005, and that date string will be indexed as Feb 10 2005. All good. As soon as you try to *overrride* Windows regional settings with dbtext.ini, problems arise. Let's summarize in shorthand, assuming the new record date is Feb 10, 2005: Trouble shows up when dbtext.ini is set to the Windows regional settings' opposite. The autodate gets *stamped* according to dbtext.ini, but *indexed* according to Windows regional settings. Remember "today" is Feb 10 2005 so the date should be getting indexed as Feb 10 2005. Wherever you see Indexed As Oct 2 2005 (Case 2 & 4) it's because dbtext.ini is set to the reverse of Windows regional settings. The take-home message is: do not assume that a date format setting in dbtext.ini overrides Windows regional settings, because it doesn't in all actions. Also, because the date index is never subject to reinterpretation, whatever absolute date was laid down at the time of the orginal indexing (usually when record was saved) is the absolute date that remains, *regardless* of whether the textbase is moved to another machine where the regional settings differ, and regardless of whether the machine the textbase resides on has its regional settings changed. You must re-index the date field to pick up on a different regional settings environment. The consequences of this legacy index behaviour are not at all clear in the Inmagic kbase article 2606 Troubleshooting when the Date format changes after upgrading operating system, nor are the risks of setting date formats in DBTEXT.INI discussed in Inmagic kbase article 2122 Date Formats Supported by DB/TextWorks. In the case of the former, there should be instructions to re-index after the Windows regional settings change, and for the latter, it should be made clear that DBTEXT.INI date format settings do not override Windows regional settings when indexing.


Tyrrell the Spaz

by Peter Tyrrell Monday, August 15, 2005 10:50 AM

Alright, just because who wants to read about scripting with Inmagic WebPublisher sort keys, I include a readable shorty.

When I was of grade school age, I had a small problem controlling my temper. It was extremely short, and I would explode as easily as a Mexican cliff diver wearing a nitroglycerine bathing cap. All my enemies at school knew this, and delighted themselves in baiting me until I blew my stack. Then they danced about and sang a little tune they made up, the lyrics of which I am happy to repeat, today, just for you. (Rock aficionados will note that my schoolyard foes based their chant on The Rolling Stones' Down in the Hole.)

Tyrrell the Spaaaaazzz, He's down in the Gutter, Beggin' for cigarettes....

I can't remember if there was more to it than that, because right at at that point a red mist would come down and I would attempt to kill them. I never did, much to my dismay, and it probably has a lot to do with the fact that I weighed in at 60 lbs. and was built like a wire coathanger.


Sort keys and see-also links

by Peter Tyrrell Monday, August 15, 2005 9:55 AM

Trying to decide whether to post something that might be useful, or to just spaz out completely. I guess it's time for an inform-o-post so as to retain justification for this blog being on the And-O-Not web-o-site.

Um, okay. <rustle> Sure to be something back here. <squelch> Ew. Not that.

Alright, so you're using sort keys with WebPublisher and you want them sort keys to be see-also links. But what's this? WebPublisher just don't do that!? No prob, Bob. Wrap the sort key in a div tag. Give div tag a unique ID (use RecordID, for instance). Call the following from a script block immediately following the div tag:

<div id="SeeAlso[RecordID]"> [SortKey:Level1] </div><script> GetSeeAlso('SeeAlso[RecordID]', '[FieldName]') </script> Reference the following javascript from the page: function GetSeeAlso(TargetID, Field) { var Target = document.getElementById(TargetID); var CleanValue = Target.innerHTML.replace(/<font>]+>/, ''); CleanValue = CleanValue.replace(/<\/font>/, ''); var SeeAlsoLink = CreateSeeAlsoLink(CleanValue, Field); Target.innerHTML = SeeAlsoLink; } function CreateSeeAlsoLink(value, field) { var str = "?AC=SEE_ALSO&QF0=" + field + "&QI0==" + value + dbtw_params; var link = "<a href='" + str + "'>" + value + "</a>"; return link; }

And that does the trick. A see-also link built from a sort key.


Blogger Jobber

by Peter Tyrrell Friday, August 12, 2005 11:03 AM

Even though keeping a blog on a static page was really fun, really, it's been ported to Blogger now. I had tried earlier with dasBlog - oh, how I tried - but couldn't reconcile its behaviour and expectations with the user control and page layout approach used on the Andornot website. So whatever. Blogs away!


Zone Alarm Pro gets the shout 'n' toss

by Peter Tyrrell Thursday, August 11, 2005 11:24 AM

When I was 18, I joined the Army Reserves for one summer. I learned many things, one of them being how to stand very straight while being shouted at in the face and simultaneously having my mattress tossed out a second floor window for the heinous crime of showing a wrinkle in one corner.

I was able to apply that valuable lesson this very day. Except this time I was the shouter, and Zone Alarm Pro personal firewall software was the shoutee. And the tossing was metaphorical, though I did in fact DELETE EVERY SINGLE VESTIGE OF THAT BUGGY MOTHER from my machine. It hasn't played nice with Visual Studio for about a year, ever since Zone Alarm 5 was released. Aggravating in the extreme. It would randomly lock up all internet traffic after a compile, and various sundry annoyances.

The thing is, I had paid in advance for two years of updates, and I was going to get my money's worth. So I just upgraded to the latest release, Zone Alarm 6. Maybe this latest would solve all the earlier problems. Maybe I could run VS and Zone Alarm and they would become the best of friends. It could happen. Updates are supposed to fix bugs, solve issues, make IMPROVEMENTS, right? When the first Blue Screen O' Death occurred while using VS, I thought: "A random BSOD. How random. Ha ha!" When the second BSOD slapped me about the jowls with its kid leather glove, I swallowed hard and looked up the offending driver. It belonged to Zone Alarm. My jaw set. On the third BSOD, I screamed an infuriated mountain gorilla scream. And beat my chest. And then I ripped Zone Alarm out of my system, tracking down every single file and yelling "DELETED!" with every deletion. It felt good. And I turned on the Windows firewall.


Month List