AnyDAC
ContentsIndexHome
PreviousUpNext
Firebird and Interbase Servers Questions

The list of questions and answers related to Firebird and Interbase Servers.

Group
Links
QF1: How I can set up a DLL path+name for fbclient.dll ?

A: The general approach is described in Configuring Drivers. To configure a DLL at run time per application basis, do the following:

If you going to configure a DLL at design time too, then better will be to use ADDrivers.ini: 

 

[IB]
VendorLib=C:\Program Files\Firebird 2.5\bin\fbclient.dll

 

QF2: Which DriverName must be used with Firebird 2.5 – IB, FB21 or ?

A: IB is the "base" driver ID. FB21 is the "virtual" driver ID. Virtual drivers are configured in the file AnyDAC\DB\ADDrivers.ini. There you can see how is configured the FB21. It is the IB base driver configured to use appropriate fbclient.dll. You can create your own virtual drivers. For example: 

 

[Firebird25]
BaseDriverID=IB
VendorLib=C:\Program Files\Firebird 2.5\bin\fbclient.dll

 

QF3: How to force AnyDAC to recognize some field as boolean ?

A: A boolean field may be created using a domain. The domain name must contain 'BOOL' substring. And add ExtendedMetadata=True parameter to your connection definition. Example: 

 

CREATE DOMAIN T_BOOLEAN SMALLINT;
CREATE TABLE ... (
  ...
  BOOLEAN_FIELD T_BOOLEAN,
  ...);

 

QF4: How to force AnyDAC to recognize some field as GUID ?

A: A GUID field may be created using a domain. The domain name must contain 'GUID' substring. And add ExtendedMetadata=True parameter to your connection definition. Example: 

 

CREATE DOMAIN T_GUID AS CHAR(16) CHARACTER SET OCTETS COLLATE OCTETS;
CREATE TABLE ... (
  ...
  GUID_FIELD T_GUID,
  ...);

 

QF5: Is there a possibility to drop a Firebird database by sql ?

A: No. DROP DATABASE command is not a FB SQL command, but it is ISQL command. 

 

QF6: How to change a User Password in Firebird?

A: AnyDAC support password changing on Firebird 2.5 (additionally to Oracle, MySQL, PostgreSQL, SQL Server and SQLite drivers) using the code: 

 

ADConnection1.Connected := True;
ADConnection1.ConnectionIntf.ChangePassword('new password');

 

QF7: How to mark a database as read only ?

A: Specify in the connection definition parameters: 

 

IBAdvanced=set_db_readonly=1

 

QF8: Looks like AutoCommit works with Firebird only if FetchOptions.Mode = fmAll or does not work at al. Could you please explain how AutoCommit really works ?

A: The background is - the COMMIT will invalidate all the cursors open in this transaction. AnyDAC handles transactions automatically using following rules:

  • if you preparing a command, and there is no active transaction, then it will be started;
  • if you will explicitly call Commit method, then all open in this transaction datasets will be brought into Offline state (FetchAll + closing + unpreparing underlying command, but not a dataset itself);
  • if transaction does not have more than single active cursor, then after fetching last record from this cursor it will be auto-committed (if requested by options).
  • if transaction does not have any active cursors, then after executing (ExecSQL) a command, the transaction will be auto-committed (if requested by options).

There are even more nuances, but the main rules are listed above. 

Automatic committing will be issued after the last record is fetched. We cannot change the behavior, so right after Open will be performed FetchAll and then Commit. As there will be no difference between fmOnDemand and fmAll. 

If you need to make the changed and posted to the DB records of this dataset visible to the other sessions, while not all records are fetched from the dataset, then just use second update transaction object. So, cursor transaction will remain active and updates will be executed in the different short transactions. That will make the changes visible to the other users. 

 

QF9: How to connect using an alias ?

A: Just set the Protocol parameter to an empty string or do not specify it at all. 

 

QF10: What does "[AnyDAC][Phys][IB]connection rejected by remote interface" mean ?

A: You are probably connecting to the Firebird server using GDS32.DLL. 

 

QF11: What does "Assertion failure (u:\da-soft\anydac\source\uADPhysIBWrapper.pas, line 2052)" mean ?

A: You are probably connecting to the Interbase server using FBCLIENT.DLL. 

 

QF12: What does "no permission for read/select access to TABLE xxxx" with FB Embedded mean ?

A: Although the security database is not used by the Embedded server, it still uses the user name to check rights. If the user name is not specified or is specified incorrectly, you get this error.

What do you think about this topic? Send feedback!