I use FirebirdSql.Data.FirebirdClient to connect to a Firebird database (WPF desktop app).
Server Version: WI-V3.0.5.33220 Firebird 3.0, and ADO.net provider version is 7.5.0 (NuGet)
I created a user other than SYSDBA that only has read only access to the tables (only SELECT). Connecting with FlameRobin works without problems with this new user. However, when I specify this new user and corresponding read-only role in the FbConnectionStringBuilder class, I get a
"your username and password are not defined"
error. If I replace the new user by SYSDBA and corresponding password, the connection works.
using FirebirdSql.Data.FirebirdClient;
namespace Test
{
class DBConnection
{
FbConnection fbConnection;
public void CreateConnection()
{
FbConnectionStringBuilder builder = new FbConnectionStringBuilder();
builder.Charset = "WIN1252";
builder.Database = "firebird2:DB_NAME";
builder.Dialect = 3;
builder.Role = "READ_ONLY_OTN";
builder.UserID = "TEST";
builder.Password = "Test";
builder.ServerType = FbServerType.Default;
fbConnection = new FbConnection(builder.ConnectionString);
fbConnection.Open();
}
}
}
What could be the cause for this error other than a wrong password (I checked it twice and also with FlameRobin)?