Ошибка [32752] OleDB C# FireBird
использую LCPI.IBProvider.5 OLeDB, делаю запрос базе данных и возвращает ошибку:
[LCPI.IBProvider.5] [Подсистема: isc_api.fb3_0] Внутренняя ошибка. Данные [индекс: 6] с неизвестным серверным sql-типом [32752].
Код ошибки COM: DB_E_NOTSUPPORTED.
Код метода:
private List<BillServiceRaw> GetBillServices(FireBirdDBConnection connection, string filterHouseID, string filterIdent,
DateTime start, DateTime end)
{
List<BillServiceRaw> result = new List<BillServiceRaw>();
string identfilterquery = string.IsNullOrWhiteSpace(filterIdent) ? "" : " AND bill.LCS_LC_Key IN" +
" (SELECT LC_Key FROM Licco_adres WHERE LC_FKey IN ('" + filterIdent.Replace(",", "','") + "'))";
string query = $@"
SELECT
(SELECT LC_FKey FROM Licco_adres WHERE LC_Key = bill.LCS_LC_Key) Ident
, LCS_LC_Key UniqueNum
, CAST(bill.LCS_MonY as Date) Datee
, usl.UU_Name Service
, bill.LCS_UU_Key ServiceID
, (case
WHEN bill.LCS_UU_Key IN (724) THEN 0
when bill.LCS_Type IN (8) THEN -bill.LCS_Sum
else 0
end) Debt
, (bill.LCS_Sum1) VolumeInd
, (bill.LCS_Sum2) Rate
, (case
when bill.LCS_Type IN (5) THEN LCS_Sum
else 0
end) MoneyRecalculation
, (case
when bill.LCS_Type IN (1,17) THEN LCS_Sum
WHEN bill.LCS_Type IN (2,3,4,9,18) THEN -LCS_Sum
WHEN LCS_Type IN (7) AND LCS_MonYTo > LCS_MonY THEN LCS_Sum
else 0
end) AccountingPeriodTotal
, (case
when bill.LCS_Type IN (1,5,17) THEN LCS_Sum
WHEN bill.LCS_Type IN (2,3,4,9,18) THEN -LCS_Sum
WHEN LCS_Type IN (7) AND LCS_MonYTo > LCS_MonY THEN LCS_Sum
else 0
end) TotalPayable
FROM Licco_sum_now bill
LEFT JOIN spr_usl usl ON usl.UU_Key = bill.LCS_UU_Key
WHERE
bill.LCS_MonY BETWEEN '{start}' AND '{end}'
{ identfilterquery } ";
OleDbCommand command = createCMD(connection, query);
using (var reader = command.ExecuteReader())
{
while (reader.Read())
{
BillServiceRaw item = new BillServiceRaw()
{
Ident = reader[0].ToString(),
UniqueNum = reader[1].ToString(),
Date = DateTime.Parse(reader[2].ToString()),
Service=reader[3].ToString(),
ServiceId=int.Parse(reader[4].ToString()),
Debt=decimal.Parse(reader[5].ToString()),
VolumeInd= decimal.Parse(reader[6].ToString()),
Rate= decimal.Parse(reader[7].ToString()),
MoneyRecalculation= decimal.Parse(reader[8].ToString()),
AccountingPeriodTotal= decimal.Parse(reader[9].ToString()),
TotalPayable= decimal.Parse(reader[10].ToString())
};
result.Add(item);
}
}
command.Transaction.Commit();
return result;
}
в базе данных 7-ой столбик имеет тип decimal(19,6) Хотелось бы отметить что в запрос корректен и выполняется в среде. Заранее спасибо всем!