Page 1 of 1

Firebird Role case sensitive not working

Posted: Fri 17 Apr 2020 23:11
by grl
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

Re: Firebird Role case sensitive not working

Posted: Wed 22 Apr 2020 10:41
by oleg0k
Hello,
Try this:

Code: Select all

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