Page 1 of 1

Invalid attempt to FieldCount when reader is closed

Posted: Mon 26 Mar 2012 12:38
by teddyFry
Hello

I am working on dotconnect for oracle 6.80 with stored procedures returning sys_refcursor in output parameter. Connecting to Oracle in direct mode and using a POCO model.
A few stored procedures work perfectly, but the vast majority return empty list.

When I inspected the ObjectResult returned by the call of my stored procedure. I note that the reader in the objectResult has the error : Invalid attempt to FieldCount when reader is closed.

Please help me

Posted: Mon 26 Mar 2012 14:38
by teddyFry
Here is a part of my edml :
(SP_MKSHIPMENTSFOR3010 works well and contains more than 20 parameters and return a cursor of 37 fields)

Code: Select all

<Function Name="SP_MKSHIPMENTSFOR3010" devart:ResultSetParameterName="RETURN_CURSOR" IsComposable="false" BuiltIn="false" Aggregate="false" NiladicFunction="false" ParameterTypeSemantics="AllowImplicitConversion">
    <Parameter Name="V_CLIENT_ID" Type="double" Mode="In" />
    ...
</Function>

...

<FunctionImport Name="GetKshipment_GetFor3010" ReturnType="Collection(CoreModel.GetKshipment_GetFor3010Result)" ed:Guid="XXX">
    <Parameter Name="V_CLIENT_ID" Mode="In" Type="Double" />
    ...
</FunctionImport>

...

<ComplexType Name="GetKshipment_GetFor3010Result" ed:Guid="XXX" xmlns:d5p1="http://schemas.microsoft.com/ado/2006/04/codegeneration">
    <Property Name="KSHPIDT" Type="Int32" Nullable="false" ed:ValidateRequired="True" ed:Guid="XXX" />
    ...
    <Property Name="CTRCOMMANDEACHAT" Type="String" ed:Guid="XXX" />
</ComplexType>

...

<FunctionImportMapping FunctionImportName="GetKshipment_GetFor3010" FunctionName="CoreModel.Store.SP_MKSHIPMENTSFOR3010" /> 


Posted: Tue 27 Mar 2012 14:47
by teddyFry
It would seem that everything works correctly now. I specified "Default Command Timeout = 0" in the connection string and I can finally access my data.