I have a report which connects to multiple DB's on SQL Server using Microsoft ActiveX Data Objects 2.8 Library. It calls a stored procedure from the SQL Server which returns a table of records from several databases.
The report works fine but it throws up an error when I try to retrieve a flowfield. On the SQL side I've tested the stored procedure in the SQL Query Analyzer and it returns the table with flowfield as expected. When i run the report in Navision it throws the following error: "The call to member EOF failed. ADODB.Recordset returned the following message: Operation is not allowed when the object is closed".
When I remove the SELECT FLOWFIELD from the stored procedure, the report runs. Otherwise it doesn't. I've been tearing my hair up trying to solve the problem. Does anyone have any ideas?
0
Comments
Here's the code in the Navision report [DataItem = Integer]:
Anyway I have solved the problem. The error occurred because for certain records, the flowfield returns NULL instead of 0.00 (when there is no Ledger Entry). So what I did was to SET ANSI_WARNINGS OFF and SET ANSI_NULLS OFF in the stored procedure. Then update records which have NULL to 0.00 and everything runs okay.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!