<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</p>
<p>
<title></title>
<meta name="generator" content="LibreOffice 4.2.8.2 (Linux)">
<style type="text/css">
<!--
@page { margin: 0.79in }
p { margin-bottom: 0.1in; line-height: 120% }
a:link { so-language: zxx }
-->
</style>
<p style="margin-bottom: 0.17in; line-height: 100%">I've copied
the following announcement to this list because of the
discussions that took place earlier this year on use of Pascal
Interfaces. The background for my interest in the subject was
the development of this package and which I believe really does
show the power of Pascal interfaces - for the package user. When
I started developing this API, it was meant to be an internal
interface to IBX2, but once developed it became clear that the
use of interfaces had provided a powerful means to effectively
embed SQL in a Pascal program with very little effort from the
user. Hopefully, this package will be useful to others.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">Tony Whyman</p>
<p style="margin-bottom: 0.17in; line-height: 100%">MWA Software<br>
</p>
<p style="margin-bottom: 0.17in; line-height: 100%">Announcement
follows:<br>
</p>
<p style="margin-bottom: 0.17in; line-height: 100%">MWA Software
is
pleased to announce the release of its Firebird Pascal API
package
(<i>fbintf</i>). This package has been derived from IBX for
Lazarus
and is part of the IBX2 development (see separate announcement).
The
intent is to provide common Pascal language bindings to the
Firebird
API that are independent of the Firebird API version. The IBX
derived
code is licensed under the Interbase Public License, with the
remaining code licensed under the Initial Developer's Public
License.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">The <i>fbintf</i>
package provides the Firebird API in a format where all data
types
for SQL data, interface parameters and results are native Pascal
types, including all parameter blocks and database information.
The
Pascal API is pitched at a similar level and purpose to the IBPP
Firebird API provided to the C++ world. The package is intended
to be
suitable for use on any platform supported by the Free Pascal
Compiler. <span style="font-style: normal">It is a required
dependency for version 2 onwards of </span><i>IBX for Lazarus</i>,
and is provided as both a standalone package and as part of
IBX2.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">It is
available
for download from <a href="http://www.mwasoftware.co.uk/ibx2">http://www.mwasoftware.co.uk/ibx2</a>.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">The Firebird
Pascal API is intended to be simple to use and to place the
minimum
burden on the API user when it comes to managing the Firebird
client
library and the various Pascal objects that are created to
provide
the API. It is implemented as reference counted COM interfaces
which,
for the API user, are as easy to use as other managed types such
as
AnsiStrings and dynamic arrays. The user only needs to worry
about
accessing and using the interface; disposing of interfaces is
performed automatically whenever an interface goes out of scope.
It
is intended to be a full implementation of the Firebird API,
including events, services, blobs and arrays.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">Two interface
implementations are provided. One is for the new Firebird 3
Client
API and the other for the legacy Firebird Client API used for
Firebird 2.x and earlier. The Firebird 3 API implementation is
used
whenever possible and the older API only if the Firebird 3 API
is not
available.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">The package is
supported by an 89 page User Guide and a comprehensive test
suite.
The test suite includes 16 separate tests covering 104
individual
test objectives. It is console mode and run from a batch script
with
automatic comparison against a reference results log. It uses
the
“heaptrc” unit to check for memory leaks. The objective of the
test suite is to provide confidence in the correct operation of
the
software over are variety of platforms and with only expected
variances between the two Firebird APIs. It is also intended to
be
the basis for regression testing. Documentation on the use of
the
test suite is provided with the package.</p>
<p style="margin-bottom: 0.17in; line-height: 100%">Given the
level
at which the package works and the power of Pascal “interfaces”,
embedded SQL statements are possible, such as:</p>
<p style="margin-bottom: 0.17in; line-height: 100%">Attachment.ExecuteSQL([isc_tpb_write,
isc_tpb_nowait,isc_tpb_concurrency], <br>
'Execute Procedure DELETE_EMPLOYEE
?', [8]);</p>
<p style="margin-bottom: 0.17in; line-height: 100%">and </p>
<p style="margin-bottom: 0.17in; line-height: 100%">writeln('Employee
Count = ',<br>
MyAttachment.OpenCursorAtStart('Select count(*) from
EMPLOYEE')[0].AsInteger);</p>
<p style="margin-bottom: 0.17in; line-height: 100%"><span
style="font-style: normal">The
</span><i>fbintf</i><span style="font-style: normal"> package
may be
used on its own </span><span style="font-style: normal">or as
part of
IBX </span><span style="font-style: normal">and has the
potential to
provide a common Firebird API to all FPC database
applications.</span></p>
</p>
</body>
</html>