8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 20:43:02 +01:00
firebird-mirror/examples/object_pascal
2022-01-27 13:25:14 +03:00
..
common Add some object pascal examples of the OO API 2020-08-18 18:57:02 +02:00
01.create.pas Add some object pascal examples of the OO API 2020-08-18 18:57:02 +02:00
02.update.pas Add some object pascal examples of the OO API 2020-08-18 18:57:02 +02:00
03.select.pas Be sure to actually use the tpb we have just declared. 2020-08-19 10:00:36 +02:00
makefile Add some object pascal examples of the OO API 2020-08-18 18:57:02 +02:00
Readme.md Fixed #7113: Wrong path in object pascal readme.md 2022-01-27 13:25:14 +03:00

Object Pascal Examples for Firebird

The aim of these examples is to copy as closely as possible the equivalent C++ examples. The primary intention is to demonstrate how to make calls to the new Firebird OO API. For this reason they should not be considered examples of best practice.

Project files for Delphi and Lazarus are not supplied. Project files take up a lot of space and hide the simplicity of the sample programs.

Each sample file can easily be converted into a project and the way to do this is explained below.

Requirements

The examples have been tested with the Free Pascal compiler on linux. The code should work with Delphi but has not been tested.

Building and running the examples

Just type make at the command line. If you do not have a standard firebird installation be sure to change the variables at the top of the make file.

Opening the code in Lazarus or Delphi

Each example is a stand-alone program. To open and run it in your favourite Object Pascal IDE you just have to convert the example to a project. In Lazarus you would do the following to create a project from 03.select.pas:

  • Copy 03.select.pas and rename it select.lpr
  • Open select.lpr as a project
  • When prompted choose 'Simple Program' as the project template
  • Go into Project options and add the following paths:
    /usr/include/Firebird
    common

You can then compile and run the example through the debugger.