DotNetFirebird.org DotNetFirebird
Using Firebird SQL in .NET.
Tuesday, April 25, 2006

Common Firebird Errors and Firebird .NET Provider Exceptions

When working with Firebird in .NET I've been collecting Firebird errors and exceptions and their causes. It saved me a lot of time because the exceptions usually came again... I'm sharing my list here - if you have something to add don't hesitate and add a comment.

Unable to complete network request to host "localhost" (Provider exception).

The client is not able to connect to the server because of the network.

Possible causes:

  • Firebird is not installed on the server.
  • Bad host name or IP address.
  • Firewall is blocking the Firebird port (default is TCP 3050).

Unable to load DLL (fbembed) (Provider exception)

The Firebird ADO.NET provider is not able to find the fbembed.dll file (embedded Firebird engine).

Possible causes:

  • The file "fbembed.dll" is not in the working directory of your application. For console or Windows forms applications it is usually the directory with your .exe file. For ASP.NET applications it's the system folder (e.g. C:\WINDOWS\system32].

Multiple Rows in Singleton Select (Firebird error)

Possible causes:

  • You are calling SELECT ... INTO statement in your stored procedure are the selection returns multiple rows. If multiple rows are expected, you have to use FOR SELECT ... DO statement.

Internal gds software consistency check (Internal error code (165)) (Firebird error)

The database file is corrupted.

Possible causes:

Arithmetic exception, numeric overflow or string truncation (Firebird error)

This error is one of the most frequent ones.

Possible causes:

  • Too long string assigned to a VARCHAR variable in a stored procedure (usually hidden because of joining string using || operator).
  • Mismatch of stored procedure variable type and field type (shorter varchar(x) in the stored procedure declaration)

Dynamic SQL Error: parameter mismatch for procedure PROCEDURENAME (Firebird error)

Possible causes:

  • Wrong number of parameters (too few or too many supplied)
  • Wrong stored procedure name

Conversion error from string "2004-12-14" (Firebird error)

Possible causes:

  • Wrong INTO order in a stored procedure

Invalid token. invalid request BLR at offset 300. parameter mismatch for procedure PROCEDURENAME (Firebird error)

See http://www.delphifaq.com/faq/delphi/database/f42.shtml

It's not possible to call EXECUTE PROCEDURE that returns something without RETURNING_VALUES.

Expression evaluation not supported (Firebird error)

Calling EXECUTE STATEMENT and joining DATE variable into the SELECT statement without apostrophes around. E.g. cmd = 'SELECT * FROM table WHERE datefield > ' || date;

Search Firebird Questions .NET:
Unable to complete network request to host localhost
Unable to load DLL
Multiple rows in singleton select
Arithmetic exception, numeric overflow or string truncation
Parameter mismatch for procedure
Conversion error from string
Invalid token. invalid request BLR at offset


Previous

Archives