Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A bunch of stuff cropped up yesterday, which is why I'm doing the Thursday installment on Friday, which is normally my day off in this series. That also means I'm missing today's WxLive webinar, but unfortunately the day only has so many hours. 

Databases!

It's time for databases. The tutorial (on page 74) makes mention of both HyperFileSQL Classic and HyperFileSQL Client/Server. I assume that means that Classic is something along the lines of SQL access to what is essentially a flat file database (e.g. SQLite) but I guess I'll find out as I go.

Out of force of habit, so far I've been using Windows Explorer to locate the various sample and tutorial projects. But there are several easier ways. 

If you close whatever project you have open, in WD 17 you'll see the following window. I've clicked on Tutorial. 

Image Added

Clicking on Open an example brings up the examples list:

Image Added

There are a lot of examples.

You can also do as the tutorial instructs, and choose Tutorial from the ? menu:

Image Added

At least in the case of Application with data, the following appears:

Image Added

And when I click OK I get a running program, but no project is loaded. That's okay, because the tutorial shows how to create the project. 

In hindsight it seems obvious, but I didn't realize that I could navigate through the project wizard by clicking on the numbered steps. Doing so just takes you to the first page of that section of the wizard, so you may still need to navigate using the arrows on the bottom of the window. 

Image Added

Analysis

The next step is creating the analysis. In WinDev terms, the analysis is the repository of information about the database, roughly like a Clarion dictionary. 

From the 6 Database section I created a new database, which process eventually led me to creating the first file (table).

Image Added

For Classic HyperFileSQL, whatever name you give to the data file will also be the physical file name, with a .fic extension. 

The tutorial is emphatic about the importance of "A record represents":

Image Added

WinDev can automatically generate and manage primary key values if you leave that option checked. 

Next I had to choose the database type for this file, indicating that it's possible to mix database  types within one analysis. 

The next screen offered support for physical files beyond 2GB and replication. I accepted the defaults. 

Image Added

Then it was time to flesh out the data file. 

Image Added

Once I tabbed to the Type field I got a popup menu with the available data types. It seems odd to me to store data as an entry type. 

Image Added

After a field has been added you can specify whether or not it has a corresponding key, whether nulls are allowed, array dimensions etc. 

Image Added

In the event that keys with single fields aren't sufficient (and I find that in most cases my keys have multiple fields), you can also create a composite key as a field. 

Advanced settings include logging and placement on generated windows/reports. There's also a GUID which is read-only. 

Image Added

And you can set some report and query properties:

Image Added

You can also create various kinds of predefined fields using metatypes, which include the data type, size/ format/picture etc. 

Image Added

But that leaves open the question of how to set all of this information for regular fields. Turns out you click on the Parameters link to expand the window to include the familiar properties information.

Image Added

This is where you do things like create radio button options:

Image Added

or, for instance, combo boxes:

Image Added

Here's my first finished file:

Image Added

That's it for today - I'll resume Monday on page 83.