将项目从 VS2005 转换为 VS2008 后 Firebird 连接错误

发布于 2024-08-12 05:07:59 字数 443 浏览 5 评论 0原文

我有一个奇怪的问题。我正在使用 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,那么我就有可能打开连接。

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

可能是什么问题?

I have a queer problem. I was working on a project with firebird 1.5.6 .NET provider and Visual Studio 2005. Everything worked fine. Then I converted the project to a VS2008 project. Now I have the problem that when I'm trying connecting to firebird database I get the an error:

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

The error shows even as I open the connection. I got this error in server type = Default but if I set server type = Embedded then I have the possiblity to open the connection.

I tried to run my project on an other pc and there it works.

What could be the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小糖芽 2024-08-19 05:07:59

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

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



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

  3. 重建项目

完成

I have this same error on connect to Interbase.
I fix it.

  1. Download Source code NETProvider-2.6.5-src.7z
  2. Edit file GdsDatabase.cs
    replace line
    return this.GetDatabaseInfo(items, IscCodes.BUFFER_SIZE_256)[0].ToString();

    this

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

  3. Rebuild project

Done

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文