I am using firebird embedded v 2.5 and the .net FirebirdSql.Data.FirebirdClient. I need to be able to retrieve the ODS version for a given database.
I have tried:
private string GetOds(FbConnection connection)
{
using (var cmd = new FbCommand())
{
var sqlQuery = "select rdb$get_context('SYSTEM','ENGINE_VERSION') as version from RDB$DATABASE";
cmd.CommandText = sqlQuery;
cmd.Connection = connection;
cmd.CommandType = CommandType.Text;
using (var reader = cmd.ExecuteReader()) // HERE ITS WHERE THE EXCEPTION IS GENERATED.
{
...
}
}
}
This generates an execption: {"Dynamic SQL Error\r\nSQL error code = -804\r\nFunction unknown\r\nRDB$GET_CONTEXT"}