Experiencing Life on the Verge

Keepin’ it real with cubicle cred

NoData, requery, and views of views (VFP)

Posted by Nancy on November 2, 2009

I’m working on a project converting a client’s VFP 9 data to SQL Server. The VFP app uses local views (via data objects) that use native VFP data and local views. Swapping the native VFP data for SQL Server data isn’t as simple as redirecting a view from a DBF to a remote view. I should have realized this since, as I well know, VFP doesn’t automatically requery underlying views.

Say I have a view on a People table that selects the last name–call it lv_PeopleByLastName. It’s trivial to redirect the view to query remote data instead of local data. But if I then use lv_PeopleByLastName with NODATA, the remote view is also opened NODATA. That makes sense. The gotcha is that requering lv_PeopleByLastName does not also requery the remote view. So, even after Requery() the local view will still be empty since the remote view is empty. One must requery the remote view, then the local view.

IOW, once open every data source operates independently. VFP doesn’t automagically maintain dependency info about an open datasource (except through the database container, of course).

This should not have surprised me. It’s not fatal, just a complication I should have foreseen. So, I can’t simply redirect a view from local data to a remote view without changing either the views or the way dataobjects manage requerying.

Here are my options as best I can tell:

  1. Change the views so they don’t use other views. To be frank, SQL syntax and I are not BFFs. I’d rather stick a fork through my hand than work as a database manager. SQL feels like one is writing entire programs in a single line of code–the antithesis of maintainability. So, I like SQL streamlined as much as possible. Luckily most queries are fairly straightforward.
  2. I could rework the data objects and the views so that data objects cascade other data objects representing underlying views that would be requeried whenever the parent object is requeried. Okay, I confess. I just threw that in there because options should always come in threes.
  3. The data objects could make note of what underlying views are involved and requery them when the object is requeried. That works. It’s not elegant, but it is effective, and considering the bottle neck is generally fetching remote data, doesn’t add significant processing time. However, if more than view uses the same underlying data, it could make for some unnecessary requerying.

It looks like option 1, with option 3 held in reserve. Which I could have had done by now instead of posting. But I’ll call this organizing my thoughts rather than procrastinating on the inevitable.

Posted in FoxPro | Leave a Comment »

Looking to bookmark existing PDF, programmatically

Posted by Nancy on October 13, 2009

I’ve used Ghostscript for some time to programmatically create and merge PDFs from Visual FoxPro. I’ve never been able to suss out how  to add bookmarks to an existing PDF document, and I’ve come to believe it’s not supported.

There are code solutions around, naturally, but so far I haven’t found a solution for automating it within VFP.  There are libraries, but not all libraries play nicely with VFP. It might be possible, but most are overkill also, since I don’t need a library full of functions. Just this one function.

Do I have to bite the bullet?

Cue tumbleweeds crossing in foreground of dust western ghost town.

Posted in FoxPro | Tagged: , , , , | 1 Comment »

Blackberry, schmackberry

Posted by Nancy on October 4, 2009

I’m eagerly awaiting the quickly approaching end to the my indentured servitude to my current cell phone contract. I’m not sure what I’ll go with next. I’m resisting the iPhone that with all my might, though the interface and open API is tempting. Besides, I’d like to stay with Verizon, however, their smart phone selection is underwhelming. I wish I could keep my Blackberry Pearl, which I love. So, why change?

  • The cost of Blackberry web connections is shocking. I haven’t started researching current costs, however, so perhaps it’s in line with the competition.
  • For a supposedly premier business tool RIM’s software for Blackberries looks and operates like first generation software. Very hard to see how they expect to compete with the likes of the iPhone.
  • RIM technical support is a misery.

Would I have selected a different phone if I had previewed the Desktop Manager before I bought into BlackBerry? Maybe since I do love the Pearl. I would have felt less aggrieved, though.

p.s. What *is* up with contracts anyway? I don’t understand why we are putting up with it. But then I don’t see why people put up with the prices cable and satellite TV charge.

Posted in Annoyances | 2 Comments »

Evaluating Joomla

Posted by Nancy on July 21, 2009

I’m looking at Joomla to serve as a simple website development tool and content management system. Hoping to find something that let me create a simple site for a client who can then go on and manage text and change pictures. I have on client in particular, a small business, with a very limited budget and no on-board technical staff. I’m skeptical since this is the realm of magic bullet in my experience…either tools are too complicated for endusers or so simplistic and restrictive as to be useless for developing a site.

Feel free to leave comments about CMS you’ve used and like, or don’t like, and why.

Are you trying to support clients who have 1K budgets for websites, who also want to be able to update info by themselves?

Posted in Cool Tools | Tagged: , , , | 4 Comments »

Email is not flawed, part 3

Posted by Nancy on July 3, 2009

Wherein we return to a theme from the recent past.

I’m an unashamed email proponent–especially for business. I hope I base it on reason, though, and stay open to seeing when I misuse or overly rely on it. I prefer email for business, although I do use it for some personal communication.

Edward Muzio is correct that email is excellent for data and facts. It is, however, good for data and facts because it documents that information. However, communication is more than documentation, and even data delivers emotional content. If it doesn’t, it’s not very interesting and why bother?

One can’t always anticipate how much or where that emotional meaning will come from. I would go so far as to say there is always emotional content in our communication. To pretend otherwise is one of the ways email can start fights.

How is email different from other forms of the written word? It’s obvious that it’s too easy to send without carefully considering either the content or the recipient. Here are the main differences as they occur to me:

  • Too easily sent
  • Infinite copy and forward and no control over recipients
  • Email is forever: not diamond-forever, but embarrass-and-blackmail-forever.

I’m not the first person to point this out, of course. However, if email communication is to be improved by making it more effective, if indeed it needs to be, then it’s the characteristics that make communication challenging we need to address.

Outlook allows one to delay sending emails for some amount of time. I set mine years ago to not automically send. I have to tell it to send. I’ve been saved many times. Mostly, I’ve been saved from glaring grammatical mistakes, or incomplete replies. Gmail has a similar feature now. If your email program has it, and you regret some of your emails, try this feature out.

Everyone should be regularly reminded, and mindful that whatever is sent can be used against you. Forever. Any apologies or explanations, the original may have been forwarded so many times your follow up will have no impact. Computer forensics experts can recover deleted data, and emails travel through multiple servers while in transit. Each step leaves traces. Think of it like picking your nose in your car. You may feel like you’re alone, but you’re not.

Posted in Software development | 1 Comment »