Firebird 异常:Table 未知

Firebird exception: Table unknown

我可以使用以下连接字符串建立与 Firebird 数据库的连接:

ConnectionString = "User ID=SYSDBA;Password=masterkey;Database=localhost:C:\MyDb\mydb.FDB;DataSource=localhost;Charset=NONE;";

但是当 C# 代码尝试执行查询时出现以下错误:

Dynamic SQL Error SQL Error Code = -204 Table unknown

我试过的代码:

using FirebirdSql.Data.FirebirdClient;
...
FbConnection connection = new FbConnection(ConnectionString);
connection.Open();
FbCommand readCommand = new FbCommand("Select Name From Customer;", connection);
FbDataReader myreader = readCommand.ExecuteReader();

肯定存在客户 table(我已经与 IBExpert 核对过 - 因为我可以读取数据)。我在 Google.

上几乎找不到任何东西

Firebird 2.5 服务器在我的电脑上 运行。可能是什么问题?

正如您在评论中确认 table 名称实际上是 "Customer",您需要在查询中引用对象名称以使其区分大小写,因此:

new FbCommand("Select \"Name\" From \"Customer\"", connection);

我假设 Name 也是区分大小写的,因此也引用了它。