Subject Re: [firebird-support] Firebird ODBC driver exception on server
Author Helen Borrie
At 02:13 AM 13/02/2010, Marius Popescu wrote:
>I developed a Web site using a Firebird database. The VB.NET program reads from the database via ODBC connection.
>
>On my computer (64 bit platform), everything works fine. I then published the Web Site on the company's server (which is 32 bit). I also installed Firebird and Firebird ODBC server for Win32. I put the database in the right folder to match the connection string. However, I get an exception:
>
>ERROR[HY000][ODBC Firebird Driver][Firebird]no permission for read/select access to TABLE CONTACT
>
>(CONTACT is the name of my table)
>
>How is it possible that Firebird ODBC driver does not have permission to READ from a Firebird database?

It happens because you have not passed a user name in the connection parameters.

When you use the fbclient that is in fbembed.dll, your client layer does not need to pass username and password in the connection string in order to connect to the database via the server that is embedded in fbembed.dll. This works, because on Windows the embedded client-server connection does not perform server-level authentication. However, if you do not supply a user name, the client layer will pass just NONE or an empty string (depending on Firebird version).

However, SQL access privileges are based *in the database*. The situation you have here is that the user name (CURRENT_USER is NONE or an empty string) and the database has no privileges stored for NONE.

All you need to do to fix this is configure the connection to pass the user name of the user (in RDB$USER_PRIVILEGES in your database) that has the required access privileges that your application requires. If you don't know how to do that for the ODBC driver that you are using, please ask on the forum for that driver.

-- If it is the Firebird driver, the forum is firebird-odbc-devel@.... You can subscribe from here: http://firebirdsql.org/index.php?op=lists#fb-odbc-devel

-- If it is a different driver, look in the vendor documentation for a contact address for the forum for that driver

^ heLen ^