Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Exception [DNET572] #541

Closed
firebird-automations opened this issue Oct 20, 2014 · 1 comment
Closed

Connection Exception [DNET572] #541

firebird-automations opened this issue Oct 20, 2014 · 1 comment

Comments

@firebird-automations
Copy link

Submitted by: Alex Phoenix (xphoenix)

Hi, guys. I think, it's time to resolve bug that described here:
http://stackoverflow.com/questions/1806144/firebird-connection-error-after-converting-project-from-vs2005-to-vs2008

I had exception while trying connect to Firebird:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index.
в System.Collections.ArrayList.get_Item(Int32 index)
в FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.GetServerVersion() в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:строка 611
в FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.AfterAttachActions() в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:строка 242
в FirebirdSql.Data.Client.Managed.Version10.GdsDatabase.Attach(DatabaseParameterBuffer dpb, String dataSource, Int32 port, String database) в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\Client\Managed\Version10\GdsDatabase.cs:строка 220
в FirebirdSql.Data.FirebirdClient.FbConnectionInternal.Connect() в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionInternal.cs:строка 191
в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.CreateNewConnection(FbConnectionString connectionString, FbConnection owner) в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionPoolManager.cs:строка 162
в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.CreateNewConnectionIfPossibleImpl(FbConnectionString connectionString, FbConnection owner) в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionPoolManager.cs:строка 191
в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Pool.GetConnection(FbConnection owner) в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionPoolManager.cs:строка 106
в FirebirdSql.Data.FirebirdClient.FbConnectionPoolManager.Get(FbConnectionString connectionString, FbConnection owner) в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnectionPoolManager.cs:строка 210
в FirebirdSql.Data.FirebirdClient.FbConnection.Open() в c:\Users\Jiri\Documents\devel\NETProvider\working\NETProvider\src\FirebirdSql.Data.FirebirdClient\FirebirdClient\FbConnection.cs:строка 539

Replacing line return
this.GetDatabaseInfo(items, IscCodes.BUFFER_SIZE_256)[0].ToString();

to this

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

helped me

File version: FirebirdSql.Data.FirebirdClient.dll 4.5.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants