An exception was raised on the server. Unknown driver IBX; why?

Until now, on my application I have used MS-SQL as a backend database. Yesterday I wanted to test some of the functionalities also on Firebird. So I have installed Firebird Server, FlameRobin, created my tables and on the the schema I have defined a new connection( choosed my driver as Interbase- I was able to see all my tables from Firebird) and set it as default.

Then I compiled my application and when the client tried to login this is the message I have received "An exception was raised on the server. Unknown driver IBX; "

After I changed the driver to FIB and still got the same message except the unknown driver was FIB instead of IBX. In my login method i have a simple query (which is defined in the schema as a data table) against the database to check for a user name and password ; for this data table’s sql statement I have set up the default connection to the Firebird one.

Am I missing something here?

Another thing is that for most of my tables in the schema I need to use custom sql statements to retrive data:

So:case 1: for such a table I will need to write 2 sql statements: one for MS SQL and another one for Firebird and the schema will know by default which one to execute (or do I need to specify which one to execute) ?

case 2: I need 2 tables: one for MS SQL and another for Firebird with a query for each?

Best wishes,

Hi,

need add to server’s data module “uses” clause corresponding unit for DB driver, for IBX it is “uDAIBXDriver”.

case1: use IMultiDbLoginService, during login connection name need to store in session and use it in BeforeAcquireConnection event handler to change connection.

case2: just define sql statement for corresponding connection.

@slavad : thank you very much for your quick response: now I ran into another problem: I have on data table for Firebird and in order to retrive data from the db i have a query with some variables inside it but the schema consideres them as parameters and actually they are not ( this happens because in firebird a variable is declared with :var and in SQL Server case it didn’t happend because the variables were declared with @)

How do I solve this thing?

Hi,

need add to server’s data module “uses” clause corresponding unit for DB driver, for IBX it is “uDAIBXDriver”.

I get an error : Delphi doesn’t recognize that unit; I don’t know what could be the problem;

Hi,

need add to server’s data module “uses” clause corresponding unit for DB driver, for IBX it is “uDAIBXDriver”.

I get an error : Delphi doesn’t recognize that unit; I don’t know what could be the problem;
Later edit: sorry ; I have found the unit on my local disk and attached the folder to delphi library path;

Hello,
Can you provide your SQL? We will retest it in Schema Modeler.

Hi vovanl : this is my query after I rewrote it (I am new to firebird). When I execute this in Database Workbench 4.3.1 Lite it works fine, but when I run it in Schema Modeler it returns this error : “Error during parsing SQL. Please check the SQL statement; Details: invalid request BLR at offset 60, bad parameter number.” I have upgraded DataAbstract to the latest version but no results. My query should return if a table exists in the database.

I am missing something but I don’t know where…and I also want to ask you which is the recommended driver to work with Firebird ? (for the moment I am using IBX driver).

EXECUTE BLOCK (tbl_name varchar(50) = :tbl_name)
RETURNS (exista integer)
AS
begin
if ( exists(select 1 from rdb$relations where rdb$relation_name = upper(:tbl_name))) then
exista = 1 ;
else
exista = 0;
suspend;
end;

Best regards,

Hello,

IBX DA driver doesn’t support this feature.
As a workaround you can use Stored Procudure for this porpose:

create or alter procedure TABLEEXISTS (
    TBL_NAME varchar(100))
returns (
    exista integer)
as
begin
  if ( exists(select 1 from rdb$relations where rdb$relation_name = upper(:tbl_name))) then
    exista = 1 ;
  else
    exista = 0;
  suspend;
end

select exista from TABLEEXISTS('employee')

You can use another driver: AnyDAC, UniDAC, FB. They are better but not free. These drivers also support your feature.
Read about DA drivers in wiki:
http://wiki.remobjects.com/wiki/Drivers

@vovanl, thank you very much, it is good to know this.