Difference between revisions of "ibase"

From Free Pascal wiki
Jump to navigationJump to search
(New page: == Free Pascal interface to Interbase/Firebird == === Overview === You can use Free Pascal to access a Interbase or Firebird database server from Linux and Windows. For more info on Interb...)
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Free Pascal interface to Interbase/Firebird ==
 
== Free Pascal interface to Interbase/Firebird ==
 
=== Overview ===
 
=== Overview ===
You can use Free Pascal to access a Interbase or Firebird database server from Linux and Windows. For more info on Interbase, see their [http://www.interbase.com/ home page]
+
You can use Free Pascal to access an [[Interbase]] or [[Firebird]] database server from Linux and Windows.  
  
 
For more information on Firebird, see their [http://www.firebirdsql.org/ home page].
 
For more information on Firebird, see their [http://www.firebirdsql.org/ home page].
 +
For more info on Interbase, see their [http://www.interbase.com/ home page]
 +
 +
Interfacing is very easy; all you need to do is compile some units, and use these units in your program. You need to specify the place of the Interbase client Library (libgds) when compiling, and that is it. the provided units take care of the rest.
 +
 +
{{Note|There is a higher level, object oriented SQLDB wrapper around this unit called [[TIBConnection]] that is more convenient to use. See [[Firebird|the Firebird article]] for more details}}
  
Interfacing is very easy, all you need to do is compile some units, and use these units in your program. You need to specify the place of the Interbase client Library (libgds when compiling, and that is it. the provided units take care of the rest.
 
 
== Requirements ==
 
== Requirements ==
 
You need at least version 0.99.11 of Free Pascal. The headers are translated for Interbase versions 4 and 6, or Firebird 1.0.
 
You need at least version 0.99.11 of Free Pascal. The headers are translated for Interbase versions 4 and 6, or Firebird 1.0.
Line 14: Line 18:
  
 
* '''ibase40''' the Interbase version 4 or 5 interface header translation. The interface is largely the same as for version 6.
 
* '''ibase40''' the Interbase version 4 or 5 interface header translation. The interface is largely the same as for version 6.
* '''ibase60''' the Interbase version 6 interface header translation. (View Interface).  
+
* '''ibase60''' the Interbase version 6 interface header translation. .  
  
 
There is also a test program available.
 
There is also a test program available.
Line 39: Line 43:
  
 
You will see a lot of messages on your screen, giving you feedback and results. If something went wrong, make will inform you of this.
 
You will see a lot of messages on your screen, giving you feedback and results. If something went wrong, make will inform you of this.
== Future plans ==
 
The interface to Interbase is a pure translation of the Interbase C header files. This means that the used functions are rather un-pascalish. It would be great to have an OOP interface for it, A la Delphi. This OOP interface is being worked on.
 
  
 
Go to back [[Package_List|Packages List]]
 
Go to back [[Package_List|Packages List]]
 +
 +
[[Category:Databases]]
 +
[[Category:Packages]]

Latest revision as of 13:37, 5 August 2016

Free Pascal interface to Interbase/Firebird

Overview

You can use Free Pascal to access an Interbase or Firebird database server from Linux and Windows.

For more information on Firebird, see their home page. For more info on Interbase, see their home page

Interfacing is very easy; all you need to do is compile some units, and use these units in your program. You need to specify the place of the Interbase client Library (libgds) when compiling, and that is it. the provided units take care of the rest.

Light bulb  Note: There is a higher level, object oriented SQLDB wrapper around this unit called TIBConnection that is more convenient to use. See the Firebird article for more details

Requirements

You need at least version 0.99.11 of Free Pascal. The headers are translated for Interbase versions 4 and 6, or Firebird 1.0.

Installation

The ibase unit is distributed as part of the Free Pascal packages, and is distributed with the compiler.

This file contains a directory base/ibase with the units, a test program and a make file. The following units exist:

  • ibase40 the Interbase version 4 or 5 interface header translation. The interface is largely the same as for version 6.
  • ibase60 the Interbase version 6 interface header translation. .

There is also a test program available.

Typing

make

Should compile the units and the program. If compilation was succesfull, you can install with

make install

(Remember to set the directory where the units should be installed.)

You can then test the program by running

make test

This will:

  • Run a script to create a table in a database, and fill it with some data. (the isql program should be in your PATH for this) . By default, the used database is testdb.
  • Run the testprogram testdb
  • Run a shell script again to remove the created table.

You will see a lot of messages on your screen, giving you feedback and results. If something went wrong, make will inform you of this.

Go to back Packages List