Publish date: 2009-07-04

New IBProvider version can emulate BOOLEAN and GUID types when working with Firebird and InterBase

The problem is:

  • GUID type is currently not supported by any Firebird InterBase server, but it is frequently used by different clients (for example, in ADO Entity Framework).
  • Boolean type is supported by InterBase starting from 7th version and is not supported by Firebird server. IBProvider can work with this type, but it lacks support from other servers.

The new IBProvider version supports Guid and Boolean types at driver level, and now you can freely use these types in your applications irrespective of Firebird and InterBase server versions.

Data is stored in the types supported by the server. IBProvider browsers data domains and if it finds a domain suitable by mask, it sets the corresponding Boolean or Guid in the column.

Domains should meet the following requirements:

  • Be based on SMALLINT type for BOOLEAN type.
  • Be based on CHAR(16) type with OCTETS charset for GUID type.

New properties enabling emulation of the types

To specify the data for the provider to interpret it as Bool or Guid, IBProvider has acquired two new initialization properties: «user_type_boolean» and «user_type_guid«.

They define the mask for the domain representing the emulated type. The mask supports «*” and “?” symbols. The mask is case sensitive.

When these requirements are not met, the provider ignores domain name and doesn’t try to substitute the type.

Emulation works for:

  • Columns with a simple type;
  • Columns with arrays;
  • OUT-parameters with a simple type;
  • OUT-parameters with arrays;
  • IN-parameters with arrays.

Restrictions for emulation of the types

Due to ISC API (IB/FB) restrictions, you should explicitly specify parameter type when using simple types for input command parameters. Automatic generation of parameter description is supported for columns with arrays.

Emulation of the types in metadata

Emulation of the types also applies to metadata schemes. The provider ensures correspondence of types read at queries running and those displayed in schemes COLUMNS, PROCEDURE_PARAMETERS, PROCEDURE_COLUMNS.

The problem of connection setting via DataLink (v1,v2,v3) dialog has been fixed

We eliminated the hangup that occurred when using DataLink from the program initiating COM for working with free threaded objects.

Optimization of the provider’s objects for free threaded COM model (v1,v2,v3)

All the provider’s objects that a user can interact with provide IMarshal interface optimized for free threaded COM-applications.

Thus, now IBProvider provides maximum support for multithreaded clients irrespective of the availability of such support from gds32.dll/fbclient.dll.

A good example of multistream client is IBProvider C++ test system that involves all available computer cores and processors into running half a million of provider tests.

Source texts of the test system are located in the catalogue «TestCode\ActiveX\IBP\oledb_test».

Finally

Application examples of the types emulation on .Net Framework: «Boolean and Guid emulation in Firebird and InterBase«.


Publish date: 2009-07-04. Copyright: IBProvider. This material may be reproduced on other web sites, without written permission but link https://www.ibprovider.com/eng required.