Invalid attempt to FieldCount when reader is closed

Invalid attempt to FieldCount when reader is closed

Postby teddyFry » Mon 26 Mar 2012 12:38

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 < T > 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
Last edited by teddyFry on Tue 27 Mar 2012 08:40, edited 2 times in total.
teddyFry
 
Posts: 7
Joined: Wed 12 Oct 2011 12:33

Postby teddyFry » Mon 26 Mar 2012 14:38

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" />

teddyFry
 
Posts: 7
Joined: Wed 12 Oct 2011 12:33

Postby teddyFry » Tue 27 Mar 2012 14:47

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.
teddyFry
 
Posts: 7
Joined: Wed 12 Oct 2011 12:33


Return to dotConnect for Oracle