8 FrontBase interface tutorial

8.1 On the FrontBase interface

At present time the FrontBase interface in Beta is available on the following platforms: Solaris and Linux

Although FrontBase is also available for Windows this is not supported by the Beta interface. The client library supplied by Frontbase requires Apple's WebObjects.

8.2 Downloading and installing FrontBase

You can download FrontBase at

http://www.frontbase.com
(push download at the top of the screen and follow the instructions given).

Installing FrontBase on Solaris:
Log on as 'root', and type the following:

tar -xvf <the .tar file just downloaded> 
sh install.sh

Installing FrontBase on RedHat Linux:
Log on as 'root', and type the following:

rpm -i <the .rpm file just downloaded>

8.3 Creating databases and users using the sql92 tool

sql92 is a small tool included in the FrontBase installation. By default it is located in
FrontBase/bin/sql92
A small example: start sql92 and type the following:
create database firstdb;
connect to firstdb user _system;
create user firstuser;
disconnect current;
connect to firstdb user firstuser;
disconnect current;

8.4 Communicating with FrontBase from a Beta program:

Almost everything is done the same way as when communicating with Oracle, ODBC etc.

The two major differences:

Please note that shared variables is currently not possible when using the FrontBase interface. Suggested workaround: build your SQL statement dynamically using append or putformat.

A small example:
ORIGIN '~beta/betadbc/betadbc-frontbase';
-- program: Descriptor --
(#
   frontbaseCon: @Connection; 
   stmt: @frontbaseCon.DirectSQLStatement; 

   do
   'brage.mjolner.dk' -> frontbaseCon.selecthost;
   ('firstdb','firstuser','')->frontbaseCon.open;

   'create table Students("Name" varchar(100), "Age" integer);'->stmt.open; 
   stmt.execute;
   stmt.close;
   frontbaseCon.close;
#)

8.5 Types in FrontBase and Beta

The following table shows the possible types of data in FrontBase, and the type to which they are mapped in Beta:

FrontBase type
Beta type
BooleanbooleanObject
IntegerintegerObject
SmallIntintegerObject
FloatrealObject
RealrealObject
Double precisionrealObject
NumericrealObject
DecimalrealObject
Chartext
VarChartext
BitUnsupported type
VarBitUnsupported type
Datetime (with hh:mm:ss = 00:00:00)
Timetime (with yy-mm-dd = 00-01-01)
TimeTZUnsupported type
Timestamptime (with both date and time set)
TimestampTZUnsupported type
YearMonthUnsupported type
DayTimeUnsupported type
CLOBUnsupported type
BLOBUnsupported type

8.6 Additional information

FrontBase homepage:
http://www.frontbase.com
Documentation on the SQL92 standard (a.k.a. SQL2), which is met by FrontBase:
http://www.frontbase.com/docs/5.html
http://cui.unige.ch/db-research/Enseignement/analyseinfo/SQL92/BNFindex.html
http://www.contrib.andrew.cmu.edu/~shadow/sql/sql2bnf.aug92.txt


The BetaDBC Library - Reference Manual and Tutorial
© 1999-2002 Mjølner Informatics
[Modified: Thursday November 9th 2000 at 16:07]