You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
In FB4.0 and FB5.0, the GetSchema() method returns truncated column names and an incorrect value for "IsKey". #1274
For example, if a table name in FB 4.0 and FB 5.0 exceeds 31 characters, the "GetSchema()" method returns truncated column names (shortened to 31 characters) and an incorrect value for "IsKey" ("false" instead of "true").
This is the complete code to help you understand the situation.
Tested with C# and Visual Studio 2026 and .NET 4.7.2 and FirebirdSql.Data.FirebirdClient 7.10.1 or 10.3.12.
Please specify your own folders for 'fbclient.dll' and the database file 'FB40.FDB'.
[!NOTE]
using System.Data;
using FirebirdSql.Data.FirebirdClient;
namespace cs_firebird_beispiel
{
internal class Program
{
static void Main(string[] args)
{
FbConnectionStringBuilder fb_connection_builder = new FbConnectionStringBuilder();
fb_connection_builder.UserID = "SYSDBA";
fb_connection_builder.Password = "masterkey";
fb_connection_builder.ServerType = FbServerType.Embedded;
fb_connection_builder.DataSource = "localhost";
fb_connection_builder.ClientLibrary = @"F:\a_makros_test\cs_firebird_beispiel\fb40x64\fbclient.dll";
fb_connection_builder.Database = @"F:\a_makros_test\cs_firebird_beispiel\cs_firebird_beispiel\ausgabe\FB40.FDB";
string fb_connection_string = fb_connection_builder.ConnectionString;
FbConnection l_fb_connection = new FbConnection();
l_fb_connection.ConnectionString = fb_connection_string;
try
{
FbConnection.CreateDatabase(fb_connection_string);
l_fb_connection.Open();
FbTransaction fb_transaction = l_fb_connection.BeginTransaction();
FbCommand fb_command = new FbCommand();
fb_command.Connection = l_fb_connection;
fb_command.Transaction = fb_transaction;
fb_command.CommandText = "CREATE TABLE \"T_123456789012345678901234567890123456789012345678901234567890\" (\"ID\" BIGINT NOT NULL, PRIMARY KEY (\"ID\"))";
fb_command.ExecuteNonQuery();
fb_command.CommandText = "ALTER TABLE \"T_123456789012345678901234567890123456789012345678901234567890\" ADD \"C_123456789012345678901234567890123456789012345678901234567890\" VARCHAR(50)";
fb_command.ExecuteNonQuery();
fb_transaction.Commit();
fb_command.Dispose();
fb_command = new FbCommand();
fb_command.Connection = l_fb_connection;
fb_command.CommandText = "SELECT * FROM \"T_123456789012345678901234567890123456789012345678901234567890\"";
FbDataReader fb_datareader = fb_command.ExecuteReader();
DataTable l_tabelle = fb_datareader.GetSchemaTable();
// return false - must be true
System.Diagnostics.Debug.WriteLine("Column ID IsKey = " + l_tabelle.Rows[0]["IsKey"]);
// return T_12345678901234567890123456789 - must be T_123456789012345678901234567890123456789012345678901234567890
System.Diagnostics.Debug.WriteLine("BaseTableName = " + l_tabelle.Rows[0]["BaseTableName"]);
// return C_12345678901234567890123456789 - must be C_123456789012345678901234567890123456789012345678901234567890
System.Diagnostics.Debug.WriteLine("ColumnName = " + l_tabelle.Rows[1]["ColumnName"]);
fb_command.Dispose();
l_fb_connection.Close();
l_fb_connection.Dispose();
}
catch { }
}
}
}
Activity
cincuranet commentedon Jul 7, 2026
Please post a repro.
magic-neo commentedon Jul 10, 2026
This is the complete code to help you understand the situation.
Tested with C# and Visual Studio 2026 and .NET 4.7.2 and FirebirdSql.Data.FirebirdClient 7.10.1 or 10.3.12.
Please specify your own folders for 'fbclient.dll' and the database file 'FB40.FDB'.