Subject unsupported on-disk structure and unavailable database (Good Info, I think)
Author Robert
Hi all,

I have been reading many posts everywhere related to the "unavailable
database" and other error messages when running the application,
connecting to Firebird database server.

It is absurd that many people are having the similar problems as mine,
which requires me to investigate (reading docs, forums, etc.) to find
the correct solution as Firebird SQL does not have the good
documentation on dealing with these "popular" problems.

Anyway, there are several items when dealing with the installation on
the "virgin" XP machine:

1) Application I developed comes with Firebird/Interbase driver (from
Devart, formerly known as Core Lab -
2) I use CodeGear RAD C++Builder 2007 Enterprise to develop the
3) I use InterBase/Firebird Development Studio from SQLLY
( Highly recommended for serious database design
4) Install FB 2.1 DB server on that virgin XP machine.
4) Main program folder is: c:\appserver
5) I copied the files as listed to c:\appserver:

appserver.exe (main executable program)
firebird.msg (I read somewhere that it's recommended)
appserver.FDB (created by IB/FB Development Studio)
fbclient.dll (the application driver must include that client library)

I started the appserver.exe program, which the error message shows
"unavailable database".

My development system has both FB 2.1 server and Interbase 2007 Server
running on it. The virgin XP machine does not have Interbase 2007
Server running on it. The appserver.exe runs fine on my development

Since the component comes with pop-up DB connection dialog, I enabled
it as part of appserver.exe...and twiddle the settings, to see if I
can make it run. It didn't work, as the error message shows:

"unavailable database"

based on the DB access settings:
User: sysdba
Pass: masterkey
Server: localhost
Protocol: TCP/IP
Database: c:\appserver\appserver.FDB

Then, I make the change to database (as posted from other forums),
which the new error appears when the appserver.exe is accessing to
appserver.FDB database:

"unsupported on-disk structure for file appserver.FDB; Found 12.0,
support 11.1"

based on the DB access settings:
User: sysdba
Pass: masterkey
Server: localhost
Protocol: TCP/IP
Database: localhost:c:\appserver\appserver.FDB

This error message seems to related to the possible conflict of
Interbase and Firebird DB server's SQL commands because the database
was created on the development system. I expect that Firebird DB
commands are not well-documented.

Then, I installed Interbase DB Server 2008 Developer Edition on the
"virgin" XP machine and registered it (as it's FREE).

Then, the appserver.exe is now running fine.

When I "stopped" the Interbase Server (using Interbase 2007 Manager
(gds_db), the appserver.exe reports the same "unsupport on-disk
structure" error as above. Then, I restart Interbase Server, the
appserver.exe runs fine. So, it must the SQL command errors that I
must find out that Firebird will not support.

I'm not sure where to stand, as I'm not too crazy about using isql to
create the database, but I use the appserver.sql with all lines
created by the DB tool...and then upload it inside the isql command
line, and learned something as shown here:

Use CONNECT or CREATE DATABASE to specify a database
SQL> CREATE DATABASE 'appserver.fdb' user 'SYSDBA' password 'masterkey';
SQL> INPUT 'appserver.sql';
Statement failed, SQLCODE = -607
Dynamic SQL Error
-SQL error code = -607
-Invalid command
-Specified domain or source column BOOLEAN does not exist
After line 22 in file ntsdb2.sql

Boolean is not supported by FB 2.1??? Gotcha...

Then, I edit the appserver.sql to replace Boolean with Integer in
Create Table section, and re-run sql input inside isql, which works

SQL> CONNECT 'APPSERVER.FDB' user 'SYSDBA' password 'masterkey';
SQL> SHOW check accts;
There are no check constraints on table ACCTS in this database
SQL> show database;
Number of DB pages allocated = 196
Sweep interval = 20000
Forced Writes are ON
Transaction - oldest = 17
Transaction - oldest active = 18
Transaction - oldest snapshot = 18
Transaction - Next = 22
ODS = 11.1
Default Character set: NONE

Then, I replaced boolean with integer in appserver.exe SQL query
command routines, and now, it's working WITHOUT INTERBASE SERVER
RUNNING on "virgin" XP machine.

Hope this info is useful for all of us who are suffering from
INTERBASE/Firebird mix-up nightmares.