Firebird error "username and password are not defined. contact your database administrator"

199 Views Asked by At

I am writing a program in C# winforms, using FirebirdClient and also Firebird 1.5 embedded to connect to a local database. Here is the code I used to connect to Firebird 2.5 version, where the connection happened normally. But it doesn't on version 1.5

FbConnection connecting_firebird = new FbConnection(@"Server=localhost; User=SYSDBA; Password=masterkey; ServerType=1; ClientLibrary=Resources\firebird1.5\fbclient.dll; CHARSET=NONE; Pooling =false; Database=D:\111.GDB");
connecting_firebird.Open();

After that, I get the error "your user name and password are not defined. ask your database administrator firebird". As far as I know, embedded server does not store login and password data, but it was enough to specify standard data, and connect happened on version 2.5, but it does not happen on version 1.5

Tried different connection combinations, and different databases. But it did not give any result. I also tried different password combinations, but that also left me without results.

Attached is a sample code

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Configuration;
    using System.Data;
    using System.Data.SQLite;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.IO;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using FirebirdSql.Data.FirebirdClient;
    using FirebirdSql.Data.Services;
    
    namespace Project1
    {
        public partial class ClearForm: Form
        {
            public ClearForm()
            {
                InitializeComponent();
            }
    
private void button3_Click(object sender, EventArgs e)
{
    try
    {
        FbConnection connecting_firebird = new FbConnection(@"Server=localhost; ServerType=1; User=SYSDBA; Password=masterkey; ClientLibrary=D:\firebird1.5\fbembed.dll; CHARSET=NONE; Pooling =false; Database=D:\111.FDB");
        connecting_firebird.Open();
        MessageBox.Show("True", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
    catch (Exception ex)
    {
        MessageBox.Show("Error\n" + "Text: : " + ex.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}
1

There are 1 best solutions below

3
Jojo On BEST ANSWER

The solution for me was to downgrade the Nuget FirebirdClient package to the lowest version(2.6.5). Surely this is not the most extreme working version to work with Firebird 1.5. I will have to find a working one. But the topic is closed. I hope someone will be useful.