Friday, February 20, 2009

Screencast Load Times Fixed

Thanks to Boudewijn on foxite.com for pointing out how slow my screencasts were loading. Turns out the default buffer before the flash video would start was set to 50 percent, which was WAY too high. I've lowered it to 2 percent and now the videos start up right away.

Requesting a Static Cursor

Did you know you can force Advantage to return a static cursor?

It is possible to force Advantage to return a static cursor on a SELECT statement that would normally result in a live cursor. To do this, use the {static} escape sequence after the SELECT keyword. For example:

   SELECT {static} * FROM emp WHERE hire_date < '1990-01-14'

Without the escape sequence, Advantage would create a live cursor for that query. With {static} specified, Advantage will create a static cursor.

From a performance standpoint, it is probably better in most circumstances to allow Advantage to create live cursors when possible. If, however, the WHERE clause is very restrictive (thus producing a small rowset) and the base table is very large, it may be faster to force a static cursor. This is because the live cursor would be implemented with a filter on the server, which would require an index scan. If the client forced the cursor to be static, however, the server may be able to quickly seek directly to the data for the rowset with minimal cost. And once the cursor is created, the server would not be required to do any filtering when the client traversed the rowset.

Wednesday, February 18, 2009

Hiding Tables

In this screencast (10 minutes) I follow up on my previous screencast where I converted a Visual FoxPro application to use Advantage in order to access DBF tables over 2GB.

While this screencast uses a FoxPro test application and DBF tables, it is not specific to those technologies. The same technique can be used with any Advantage client and any development environment. The technique applies to our proprietary ADT tables as well.

This time around we will modify OS file permissions and hide the DBF tables from all users. In addition, we will configure a server-side alias, which allows us to hide the path to the physical data files.

One important point I failed to mention in the screencast is that a server-side alias also allows us to close all file shares on the server machine. This is extremely important for security purposes. With this setup, you don't have any file shares exposed on your server, but can still access your tables via your Advantage connection from the client. In the case of a Visual FoxPro application, you would just put the DBC files on the client, and hide the data tables on the server.

We're not finished securing our tables, however. In my next screencast, I will show how easy it is to encrypt our tables, indexes and memo files.

Watch the screencast directly or download it (open the html file after unzipping).

Tuesday, February 17, 2009

Delphi Developer Days

Jim McKeeth has posted an interview with Cary Jensen and Marco Cantu about their Delphi Developer Days training courses which are coming up in March and April.

The depth of knowledge required to write their Delphi books combined with real world consulting experience provide them with a unique and very qualified perspective on Delphi development. I've attended presentations by both Marco and Cary in the past and they are not professional trainers by accident! They are very clear, easy to talk to, open to questions/feedback and professional. In addition, they are limiting attendance which means you will have plenty of opportunities for one-on-one questions and discussions.

Friday, February 6, 2009

Using Tables Over 2GB in Visual FoxPro

I have posted a 15 minute screencast showing how to support DBF tables over 2GB in Visual FoxPro.

You can watch the screencast directly or download it (open the html file after unzipping).

You can check out other Advantage screencasts in the Advantage Developer's Zone screencast area.

Wednesday, February 4, 2009

Delphi Keyboard Shortcuts

In the Advanced Delphi class I often teach at our Advantage training events I spend some time at the end of the session discussing keyboard shortcuts. Usually at least half of the class learns a useful shortcut they were not aware of, and they also often tell me about a shortcut I did not know about.

Today while reading a blog post from Nick I stumbled on a Delphi shortcut I imagine a majority of my readers already know, but hopefully you are not in that majority as this post will mean a lot more to you that way!

I did not know you can use CTRL+SHIFT+UPARROW/DOWNARROW to quickly jump between a method declaration and its body.

I know how to accomplish this in other editors, but I did not know the Delphi editor could do this. Of course, I have never spent any time looking to see if there were shortcuts I was unaware of that could increase my productivity. I usually just settle into my normal habits and it's business as usual.

Here is a comprehensive list of Delphi IDE shortcuts. I hope you find one or two that will instantly increase your productivity.