Subject Re: [IBDI] Re: IBAccess for Linux
Author John Culleton
Peter Morris wrote:

>
> Does MDBMS support transactions ?
>
> Pete
>
>> But now I buy for my own account only. All my serious work
>> is Linux based. There are freeware RDBMS available for
>> Linux. The one I plan to use pending the avail-
>> ability of a free Kylix is the aforementioned MDBMS
>> (Marty's DBMS) which has a very easy interface to
>> HTML via a cgi-bin program. It is of course much
>> more limited than Interbase but it has better inherent
>> security as I mentioned in a previous post.
>
>
>
>
>
>
>
MDBS offers:
No transactions, no triggers, no procedures
coded in their own special language, no blobs and
no links to anything approaching Delphi.

One program operation, simple API (no preprocessor),
better security (remember that discussion?)
built in tcp interface, easy cgi interface, utility
interface something like isql (interestingly enough
it uses telnet) and in general a simple,
lightweight totally brilliant product. It is not recommended
for heavy use or large data files. It is a little fussy
about format (e.g., command (param) works, command(param) doesn't.)
Documentation is sketchy.

Free for hobby use, shareware ($100 AFAIK) for commercial use.

Not updated since March 2000. Marty is still around and answers
email.

The cgi interface is interesting. You write your own html, something as
simple as:
<html>
<body>
<form method=post action="../cgi-bin/mgen.cgi">
<input type=hidden name=file value="sample.mhtml">
<input type=submit>
</form>
</body>
</html>

Then you put mgen.cgi in the cgi-bin directory. This program does not
change. The application is also put in cgi-bin in the form of a
foo.mhtml file:

(sample.mhtml file follows)

<HTML>
Connect command:
<! mdbms connect "localhost">
User command:
Access system database
<! mdbms database system>

<h3>All databases:</h3>

Below you'll find a list of all databases: <br>

<! mdbms query "select * from databases" q1>

<table border=1>
<tr> <td>Name</td> <td>Authorization</td> </tr>
<! mdbms print_rows q1 "<tr> <td>$0</td> <td>$2</td> </tr>">
</table>

<br>
Now let's calculate some things:

<! mdbms query "select count(*) from databases" q1>
<! mdbms getrow q1>
<! mdbms set $totalentries=$0>
<! mdbms print "The total amount of databases is $totalentries"><br>
<! mdbms if $totalentries >= 10>
<! mdbms then>
You have more than 10 databases
<! mdbms else>
You have less than 10 databases
<! mdbms fi>

<! mdbms set $othervar=$totalentries*2>
<! mdbms print "Amount was:$totalentries, times 2 is:$othervar">
<br>
Finally let's print a calander:<br>

<pre>
<! mdbms pipe $cal="cal 1998">
<! mdbms print "$cal">
</pre>

</HTML>

This particular example accesses the "system" database which contains
all the schema data. In the real world you would password protect it of
course. In this example there is no password on the "system" dbms.

The example should be self explanatory. You can do updates from html too.

Visit http://www.hinttech.com for download.

Shakespeare's First Folio was not written by a committee, nor
did it pass a formal corporate approval process. Don't underestimate
the work of a brilliant loner (Linus Torvalds for example.)


John Culleton