【问题标题】:Firebird connection error after converting project from VS2005 to VS2008将项目从 VS2005 转换为 VS2008 后 Firebird 连接错误
【发布时间】:2009-11-26 23:42:11
【问题描述】:

我有一个奇怪的问题。我正在使用 firebird 1.5.6 .NET 提供程序和 Visual Studio 2005 开展一个项目。一切正常。然后我将项目转换为VS2008项目。现在我遇到的问题是,当我尝试连接到 firebird 数据库时出现错误:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index.

即使我打开连接,错误也会显示。我在server type = Default 中遇到了这个错误,但是如果我设置了server type = Embedded,那么我就有可能打开连接。

我尝试在另一台电脑上运行我的项目并且它可以工作。

可能是什么问题?

【问题讨论】:

标签: c# .net visual-studio-2008 connection firebird


【解决方案1】:

我在连接到 Interbase 时遇到同样的错误。 我修好了。

  1. 下载源代码NETProvider-2.6.5-src.7z
  2. 编辑文件 GdsDatabase.cs 换行 return this.GetDatabaseInfo(items, IscCodes.BUFFER_SIZE_256)[0].ToString();

    ArrayList ar = this.GetDatabaseInfo(items, IscCodes.BUFFER_SIZE_256); if (ar.Count > 0) return ar[0].ToString(); else return String.Empty;

  3. 重建项目

完成

【讨论】:

    【解决方案2】:

    在这里阅读article 可能会对您有所帮助?

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-07-31
      • 1970-01-01
      • 1970-01-01
      • 2011-11-23
      • 2012-06-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多