views:

158

answers:

2

Hello,

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???

Best Regards.

A: 

Maybe this might help you by reading this article here?

Hope this helps, Best regards, Tom.

tommieb75
A: 

This is the stack trace error that I have got.

   at System.Collections.ArrayList.get_Item(Int32 index)
   at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.GetServerVersion()
   at FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database)
   at FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect()
   at FirebirdSql.Data.FirebirdClient.FbConnectionPool.Create()
   at FirebirdSql.Data.FirebirdClient.FbConnectionPool.CheckOut()
   at FirebirdSql.Data.FirebirdClient.FbConnection.Open()
   at DbAccess.Connect() in D:\Appi\Connection.cs:line 87

And line 87:

               ...
               conn.Open();
               ...

I really don't know what to do.

Jooj
Strange, apparently the server is not returning a server version string. What Firebird version is this? Have you tried updating it?
Douglas Tosi
I've solved it. The problem was that I must after windows restart restart the FB server manualy. Don't know why, but so I solved this problem.
Jooj