Clarion News

Clarion Product News

<June 2007>
SuMoTuWeThFrSa
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

Navigation

Subscriptions

The C7 Database Browser - A First Look

Hello, and welcome back to everyone.

Here is a first look at the new C7 Database Browser.

When I first started writing this blog, I thought “OK this one’s going to be easy… What can you say about a simple Database Browser?”

Apparently, a lot more than I thought.

…and this seems to be the norm for all of the different areas of the new C7 IDE. It starts off pretty simple, but then the more you use it, you start to uncover its potential for much more and the excitement begins to build.

*****************************************************

As in all other versions of Clarion, the purpose of the Database Browser is to open and view the actual data of any table. (In prior versions, it was called the Database Manager)

To open the C7 Database Browser, you can select Tools > Browse Table from the IDE Menu.

You will also be able to open it from the C7 Start Page (formerly known as the Pick List), but this option is not yet integrated in the current alpha release.

Anyway, the first thing that the Browser needs to know is the type of table that you are browsing. A list of Database Drivers is displayed. From this list, select a registered driver, or press the Add Driver button to register a driver “on the fly” if not listed.

The driver that you select determines the connection dialogs that follow.

If the driver type is ISAM based, in the next dialog you will only need to select the file to browse, and also enter an optional password in the Owner prompt.

 

If the driver is SQL based, a connection dialog will be presented, allowing you to provide a server name, database, user name and password (if applicable).

 

After a successful connection to the SQL database, you will be prompted to select the appropriate table.

After providing the necessary file name and optional connection information, the Database Browser is displayed:

 

 

Just to contrast, here is the same table in the C6 Database Manager:

 

 

As I began to explore the C7 Database Browser, I uncovered the following features.

  • Double-clicking on any column sorts by that column
  • Double-clicking on any column line auto-sizes the column to display all data elements
  • Dragging the column left or right shifts column order or position in the Browser.
  • Double-click on any column to edit its contents.
  • The left most column is a row indicator. Click on that column to select an entire row. Press the Delete key to delete the selected row.

When you scroll to the bottom, you should see the following row: 

The row indicator indicates an empty row, and here is where you can add new data if needed.

 

Let’s move to the interface just below the grid. This is the Find (locator) and Filter dialogs. You will see that they are both powerful and easy to use.

The Find dialog allows you to locate the first matching record, based on a simple "field = value" query.

In the Field prompt, select a column from the drop list. Enter a valid search criteria in the Value entry. The value to search for must be an exact match. String values should not be quoted.

 

The Filter dialog allows a more varied search. You can have the IDE guide you to construct the proper search criteria, or check the Free form check box to enter your own search expression.

Some rules when using the Free form style:

  • If the file has a prefix the Filter expression requires the use of [ ] as in [prefix:fieldname]
  • String values on the right hand side of the expression must be enclosed in single quotes.
  • LIKE can use either % or * for a wildcard at front or back of the value:
    e.g., LIKE '%test', LIKE '*test', LIKE '%est%'
  • The IN operator takes a list of values enclosed in parentheses:
    e.g., LastName IN ('Bagley','Cade'), Zipcode IN (33062, 33358)

 

Press the Apply Filter button to execute the query and display the filtered records in the view window.

Press the Remove Filter button to clear all filter values and display all records of the table.

 

For example, in the STUDENTS.TPS table above, I was looking for a particular address, and I remember that the house number contained “11”. I applied the following filter criteria, and here is the result:

 

 

Let’s try another one. How about searching a set of specific zip codes?

 

So that’s some of the basics. I think that you will really like the new interface. We already have plans to add more features and accelerator keys, and of course your comments as always are welcomed.

 

posted on Tuesday, June 19, 2007 6:56 AM by Bob Foreman

# re: The C7 Database Browser - A First Look @ Tuesday, June 19, 2007 10:52 AM

Bob,

Will the Browse Table feature require exclusive access, or will it be more like topscan?

Regards

Mark

Mark Sarson

# re: The C7 Database Browser - A First Look @ Tuesday, June 19, 2007 12:05 PM

Mark,

The Browser generally opens files in shared mode, so no exclusive access needed. The only time exclusive access is required is when a change has been made to the FILE structure in the Dictionary, and then you choose to Browse the table. In that case you are offered to convert the table to the new structure, if you choose to convert then the original table is opened for exclusive access, the data is moved into the new structure, then the original table is closed and the new table is opened for shared access.

Robert Zaunere

# re: The C7 Database Browser - A First Look @ Tuesday, June 19, 2007 2:31 PM

It would be nice if you can compress/expand the FIND/FILTER section of the screen. It may only be a few times you need to find or filter, but it seems to be taking up room for 4 to 6 more records. Maybe a small X in the upper right to hide it or a up/down arrow key to make it appear/disappear.

Speaking of more room - since everyone is now using 1024x768 monitors, it would be great if the screen designers remember that when converting to C7. The "Open TopSpeed File" dialog you posted above could be wider to show more of the file names.

BTW: Password and Previous share the same HOTKEY.

Robert

# re: The C7 Database Browser - A First Look @ Tuesday, June 19, 2007 8:37 PM

What about dimensioned fields? The current browser's handling seems to be a bit of an afterthought.

David Jung

# re: The C7 Database Browser - A First Look @ Wednesday, June 20, 2007 7:25 AM

Hi David,

>What about dimensioned fields? The current >browser's handling seems to be a bit of an >afterthought.

It's on the features list and most certainly is planned for implementation. A "first look" usually implies that there will be a "second look" :-) - so as more features are implemented I will be posting a follow up to this blog.

Bob Foreman

# re: The C7 Database Browser - A First Look @ Friday, June 22, 2007 8:09 AM

Bob, thanks for the advance look. One thought. Could you select the table first and let the Database Browser determine the driver and connection requirements without prompting unless the driver is not installed or the connection information is a variable?

Bob Sutton

# re: The C7 Database Browser - A First Look @ Wednesday, June 27, 2007 12:03 PM

>Could you select the table first and let the >Database Browser determine the driver and >connection requirements without prompting >unless the driver is not installed or the >connection information is a variable?

Good suggestion! I will forward this to the development team.

Bob Foreman

# t mobile my faves phones @ Sunday, October 28, 2007 5:54 AM

t mobile my faves phones

t mobile my faves phones

# t mobile my faves phones @ Sunday, October 28, 2007 5:54 AM

t mobile my faves phones

t mobile my faves phones

# t mobile my faves phones @ Sunday, October 28, 2007 5:54 AM

t mobile my faves phones

t mobile my faves phones

Powered by Community Server, by Telligent Systems