weary as water

every time i blink i have a tiny dream

Flex 4 vs ColdFusion vs SQL Server data typing: Issues with Rounding

I have been pulling my hair out for a few hours, trying to figure out why Flex seemed to be automatically rounding numbers en route to the SQL Server (via Coldfusion). It was hard enough figuring out how to set a datatype to Number (the flex typing generator automatically sees decimal values as “string”, so to set the type as “number” you need to make sure the column in SQL server is empty before configuring the return type. Flex will configure that column as an “object”, and you can cast it as a Number (using the dropdown box) before saving the return type).

Basically, when you configure a return type to use a Number, the coldfusion service uses a cfsqltype=CF_SQL_DECIMAL type in it’s update & create services. This sends a rounded integer to the SQL server, instead of an actual decimal amount. When I changed this to cfsqltype=CF_SQL_VARCHAR, everything behaved normally. (And surprisingly, SQL server did not complain about the improperly typed object).

Sending Outlook Calendar Reminders as Emails

Someone at work just asked me if they could get email reminders of Birthday calendar events, and I found this Microsoft KB article about writing VB code to accomplish this. I tweaked the code a little bit, but it seems to be working find so far. Note – Outlook must remain open for the reminder emails to be sent.


Private Sub Application_Reminder(ByVal Item As Object)
If Item.Sensitivity <> olConfidential Then
If InStr(1, Item.Subject, "birthday", vbTextCompare) > 0 Then
If TypeOf Item Is AppointmentItem Then SendApptReminder Item
End If
End If
End Sub

Private Sub SendApptReminder(ByRef Item As AppointmentItem)
SendPage Item.Subject & " Reminder", Item.Subject & " - " & FormatDateTime(Item.Start, vbGeneralDate) & vbCrLf & _
Item.Location
End Sub

Private Sub SendPage(ByRef Subject As String, ByRef Body As String)
Dim oEmail As Object
Set oEmail = Application.CreateItem(olMailItem)
oEmail.Subject = Subject
oEmail.Body = Body
oEmail.Recipients.Add "Contact For Reminders"
oEmail.Send
End Sub

march 9

Spring is here! Time to dust off the camping gear and get outta here.

Spent yesterday afternoon and evening installing dotLRN at work. The installation did not go smoothly – lots of compile issues – but I got it worked out. As hard as it was to install, it is easy and intuitive to use. The doc we presented it to today seemed to like it, so we’ll see where it goes from here.

There’s talk at work that I may shift to a purely programming/sysadmin role, which I’m hoping happens. Don’t get me wrong – I like what I’m doing now (mostly tech support with a little sysadmin thrown in), and I generally like the people I support…but I’m definitely bored and that makes me feel stagnant and generally unproductive.

Today I got a call on my cell from Chuck, a homeless (I think, although I’m not sure) guy who comes up to the fountain for Food Not Bombs. I gave Chuck my phone number last weekend because he skips in and out a lot, and he showed up saying that he had broken his back. Today he called from the hospital, upset and saying that his back is fucked and they want to do surgery on it, which he doesn’t want. I didn’t really know what to say, except that it sucks and I’m glad that he is not in a life or death situation, even though it’s painful as hell. I think he just wanted to hear a friendly voice.

entourage vs. exchange server upgrades

The scene: One distraught user, working on a Very Important Project (aren’t they all – this one really was, though), whose entire email heirarchy had duplicated itself and then systematically deleted all messages from within all folders (including contacts, calendars, etc).

The culprit: Entourage 2004, with all patches applied. And, an Exchange server migration of said users mailbox.

The solution: Who wants to wait around to restore from tape? The easiest way to fix this (without restoring from tape) is to have the user log into Outlook 2003 on a machine that has this registry fix applied: http://support.microsoft.com/kb/246153 – and then systematically restore deleted items from each subfolder.

If you do end up restoring from tape, delete the munged Exchange profile (not identity) within Entourage *before* the restore, and then recreate the Entourage profile after the restore is complete. Otherwise, this will be an endless cycle.

macintosh issue with lost resource forks

When files created under Macintosh applications are copied to a PC-formatted storage location, they will lose their resource fork. In other words, if there is no valid file extension, the file will lose its application association. When copied back to the Mac, these files will show up as “UNIX executable files” and are essentially useless. For applications that are PC-compatible, this problem is easily solved by renaming the file to include the three-letter pc extension (ie – .doc, .pdf, .xls). However, for applications such as CricketGraph and CellQuest, you must manually restore the resource fork before the file will open in the correct application.

Enter FileTyper, a shareware program you can download here, here, here, and here. This Classic program allows you to restore lost resource forks, by manually naming the file type and creating application. And – it allows batch file processing via AppleScript, which is really freaking handy.

And now, for my own reference:

CricketGraph Data File Attributes:
Type: CGDW
Creator: CRGR

CricketGraph Graph File Attributes:
Type: CGGW
Creator: CRGR

CellQuest Figure File Attributes:
Type: BDLE
Creator: BDLY

CellQuest Data File Attributes:
Type: BDLM
Creator: BDLY