Firebird Role case sensitive not working

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
grl
Posts: 1
Joined: Fri 17 Apr 2020 23:00

Firebird Role case sensitive not working

Post by grl » Fri 17 Apr 2020 23:11

Hi!

With Firebird SQL Dialect 3 roles are case sensitive and has to be provided in quotation marks.
But this does not work with UniDAC (8.1.2 in my case).

I tried:
In Firebird (V3)

Code: Select all

CREATE ROLE "Testrole";
GRANT ALL ON "Testtable" TO ROLE "Testrole";
In by code:

Code: Select all

DB.SpecificOptions.Values['Role']:='"Testrole"';
This does not work - the user is not assigned the selected role, CURRENT_ROLE in Firebird is set to none.


When I change the roles to uppercase it works:
In Firebird (V3)

Code: Select all

CREATE ROLE TESTROLE;
GRANT ALL ON "Testtable" TO ROLE TESTROLE;
In by code:

Code: Select all

DB.SpecificOptions.Values['Role']:='TESTROLE';
This works as expected.

But the roles are predefined by another application so I need to use the case sensitive version.

How can I achieve that with UniDAC?

regards,
Lukas

oleg0k
Devart Team
Posts: 78
Joined: Wed 11 Mar 2020 08:28

Re: Firebird Role case sensitive not working

Post by oleg0k » Wed 22 Apr 2020 10:41

Hello,
Try this:

Code: Select all

  
  UniConnection.SpecificOptions.Values['Params']:='sql_dialect=3';
  UniConnection.Connect;
wbr, Oleg
Devart Team

Post Reply