English 中文(简体)
Firebird connection error after converting project from VS2005 to VS2008
原标题:

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?

问题回答

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





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签