#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    3
    Rep Power
    0

    Exclamation Firebird Internal Functions Inaccessible


    Dear FB Developers,

    I have a Firebird 2.1.1 database deployed over a LAN. In a recent upgrade I used an FB internal function (COALESCE). When I was testing my Delphi app on my development machine there were no problems.

    But when I tried to run a query on a production machine I received an error message telling me that the function (COALESCE) was unavailable.

    Coalesce is a built in internal function in FB. It is not a UDF or a stored proc, it is built in.

    Q: Why does a query using Coalesce work on my development machine but not a production machine?

    Some more Info:
    ----------------
    - Same version of FB on both computers.
    - XP pro SP 2 on both
    - My program is developed in Delphi 3.0 with BDE
    - BTW: I installed FB server on the workstation (production machine) and low and behold the query using Coaclesce works! I thought Coaclesce was an internal function?! I don't want to have to install FB Server on every machine. There are over seventy workstations in three different locations.


    Frustratedly yours,
    Jonathan ELkins
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    249
    Rep Power
    14
    Originally Posted by JonathanElkins
    Dear FB Developers,

    I have a Firebird 2.1.1 database deployed over a LAN. In a recent upgrade I used an FB internal function (COALESCE). When I was testing my Delphi app on my development machine there were no problems.

    But when I tried to run a query on a production machine I received an error message telling me that the function (COALESCE) was unavailable.

    Coalesce is a built in internal function in FB. It is not a UDF or a stored proc, it is built in.

    Q: Why does a query using Coalesce work on my development machine but not a production machine?

    Some more Info:
    ----------------
    - Same version of FB on both computers.
    - XP pro SP 2 on both
    - My program is developed in Delphi 3.0 with BDE
    - BTW: I installed FB server on the workstation (production machine) and low and behold the query using Coaclesce works! I thought Coaclesce was an internal function?! I don't want to have to install FB Server on every machine. There are over seventy workstations in three different locations.


    Frustratedly yours,
    Jonathan ELkins
    What is the exact error message you're getting?
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
    http://www.upscene.com
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    3
    Rep Power
    0
    The following is returned through my Win32 Delphi program:

    General SQL error.
    Function unknown
    COALESCE

    The error message would be what the BDE returns.

    And I get this error from Borland's WISLQ32.exe when I run a query that uses COALESCE

    Query: select coalesce(city, "hello") from city

    Gives the following error:

    Dynamic SQL Error
    -SQL error code = -804
    -Function unknown
    -COALESCE

    If I run the same query on a workstation where I have installed FB server I get no error message. The select seems to run as expected.

    BTW: It may not be clear in my post: The upgrade is to a Delphi system that I have created and to the underlying database schema not Firebird server.

    This upgrade is the first time I am using internal functions.

    -Jonathan.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    249
    Rep Power
    14
    Originally Posted by JonathanElkins
    The following is returned through my Win32 Delphi program:

    General SQL error.
    Function unknown
    COALESCE

    The error message would be what the BDE returns.

    And I get this error from Borland's WISLQ32.exe when I run a query that uses COALESCE

    Query: select coalesce(city, "hello") from city

    Gives the following error:

    Dynamic SQL Error
    -SQL error code = -804
    -Function unknown
    -COALESCE

    If I run the same query on a workstation where I have installed FB server I get no error message. The select seems to run as expected.

    BTW: It may not be clear in my post: The upgrade is to a Delphi system that I have created and to the underlying database schema not Firebird server.

    This upgrade is the first time I am using internal functions.

    -Jonathan.
    Hello Jonathan,

    Is there any chance the BDE is actually connecting to some InterBase instance instead of Firebird?
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
    http://www.upscene.com
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    3
    Rep Power
    0
    Originally Posted by upscene
    Hello Jonathan,

    Is there any chance the BDE is actually connecting to some InterBase instance instead of Firebird?
    Nope, there isn't. The WISQL.exe tool does not even use the BDE.

    Though I may have installed FB on top of an existing installation of IB. I'll check that out and see if my problem still occurs on fresh installations of FB.

    thank you. I'll get back to you with what i find out.

    -jonathan.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Posts
    9
    Rep Power
    0
    I wonder if this has been resolved yet? I'm wondering if there are wider implications.

    The BDE was an interesting piece of software, well ahead of its time when released, but I always had a suspicion that some addresses in it were hard wired! I'm assuming you are using fbclient.dll in the application folder, but could the bde be directing some calls to other places? for example (or do I mean specifically) could there be an old copy of gds32.dll hanging around in the windows\system folder? this would be overwritten if the server was installed. - Well I know I'm clinging onto straws but its all I can think of.

    So do let us know if you have found the answer.

IMN logo majestic logo threadwatch logo seochat tools logo