Sunday, April 01, 2007

Extracting images out of General fields

I think most of you know that sticking images in VFP General fields is considered a bad practice. I also know many VFP developers were lulled into the cool idea of storing images and other files into General fields, myself included back in the mid-90's. Then you quickly realize you cannot get the images out of the memo files without some great pain.

I have been lucky over the years because I have not run into any requirements or projects needing to work with General fields. That is until recently. A new project I am working on has some BMPs stored in VFP DBFs and the developer I am working with knows he made a mistake and is ready to correct it as we rewrite his vertical market application in a short 5-6 week period. I have outsourced the conversion part of the app to one of my subcontractors. I know I had read somewhere how you can extract the image data, but could not recall where. Since I did not have time to look it up I delegated it to the person doing the conversion and the answer came quickly.

How to export pictures from General fields by using the ReportListener base class in Visual FoxPro 9


In this Microsoft KnowledgeBase (KB) article Trevor Hancock (a wizard in support for VFP) details and provides code to extract the images using the HTML Report Listener. Pure "Freaking Magic"!

This one KB article saved our project days of development. Thanks Trevor. I know you work in a role on the Fox Team that is probably one of the more difficult (always being handed something allegedly broken) and probably one of the more thankless roles. I have observed Trevor in action and he is one of the best problem solvers I have had the pleasure of working with in my years of beta testing. Thanks to the architects of the powerful ReportListener that makes mince meat of the long time problem of extracting images from the General fields. Very nice piece of work!

Labels: , ,

Friday, March 09, 2007

Windows Mobile DST Patch - More frustration

I swear this must be a full moon as my software frustrations with Palm and likely Microsoft continue today...

I get home this evening. I have a list of 24 things to do before I leave for the airport in the morning to head to Seattle. I check the mail and see a postcard from Palm telling me to immediately download a Daylight Savings Time (DST) patch for my one year old Treo 700W. Great, just what I need. Last weekend I spent an hour updating all my computers with the XP DST patch, now I have to get the phone updated with no time to do it.

I pop open the PC and download email and set up my phone to sync using ActiveSync 4.1, which is the version I got with the phone. I just installed it on my new machine several weeks ago. I get an email from Palm noting that I better update my Windows Mobile machine with the DST patch. This email was delivered at 7:07pm EST, after the workday on the day before the new Daylight Savings Time kicks in here in the USA. Less than 37 hours before the deadline. Who decided this was a good idea?!?!?

Reading through the steps I have to upgrade to ActiveSync v4.5. So I do. I follow the steps as I am instructed as a good user should. What does this get me? How about a whole new Active Sync profile. What does this mean? It means that the PC and the phone are being completely reintroduced to each other as if they never met before. What the heck?!?!? Shouldn't one think it should perform an upgrade when you go from 4.1 to 4.5 and it would use the same settings? Thanks Microsoft, nice work.

So now I have to reset all my options and make sure I don't lose anything. Never the case though as SplashID (tool I use to store all my passwords) dumped the database. I have to reconnect it to the phone, cross my fingers and pray the passwords stored on my phone sync back to the now empty database on my phone. Fortunately I recovered all the information and was able to recall a password I changed just before I left a client today.

Thanks for making my night Palm and Microsoft. What are you guys thinking? Just in Time compiles are one thing, but Just in Time Deployments (JITD) are INSANE. All I got to say is: this patch better work!!!! Can't wait to see how all this works Sunday morning.

And don't even get me started on the moron congress people who thought this was such a great idea. I doubt they had even a slight clue on the impact they had the day they voted for the Energy Policy Act of 2005.

Before this little detour the only thing I did on my list was eat dinner. Twenty-three items to go. No problem, my flight is not until 9:30am. Argh.

Labels: , , , ,