web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Fetch out of range

(0) ShareShare
ReportReport
Posted on by 904

 Hi,

we are doing an exe that should create a journal import file and launch the SL transaction import. It calls a stored procedure to prepare data before creating the import file, etc.

It throws the error below. We would appreciate any input!!

SQL Server Message 65: [Microsoft][SQL Server Native Client 10.0]Fetch type out
                       of range

 

  Debugging info: ODBCsysfetch8_2 -
                       SQLFetchScroll Failed
  Cursor(4) xPF_Commitments 'HHH'
  Optional info: SqlState = HY106
                       NativeError = 0 ErrorMsg = [Microsoft][SQL Server Native
                       Client 10.0]Fetch type out of range pcbErrorMsg =
                       65
ODBCRowNumber = -1 Column = -1 SSrvrLine = 0
                       SSrvrMsgState = 0 SSrvrSeverity = 0 SSrvrProcname =
                       SSrvrSrvname =

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Often the SQL 65 error concerns  having Set NoCount Off when it needs to be left on.

    The no count issue is prevalent in 2011 but we didn't see it in prior version.  The other numbers with this issue are 93 and 63.

    In one case using a custom trigger, the suggestion was to remove the SqlFastReadOnly if you have one.

    Another suggestion was to make the ORDER BY clause in the proc to include all the fields in the  index  .

    A trace running while the error is generated may lead to an idea.

  • Coen Pretorius Profile Picture
    904 on at

    Hi Elaine,

    thank you for the input. We will test and let you know.

  • Coen Pretorius Profile Picture
    904 on at

    Hi Elaine,

    unfortunately that did not resolve the issue

  • Coen Pretorius Profile Picture
    904 on at

    The developer syas that the SP is launched successfully and brings back the data but falls over when the internal cursor tries to populate the array

  • Community Member Profile Picture
    on at

    try to use Ltrim within SP.

  • Mark E Profile Picture
    6,451 on at

    I am running into this same issue with a proc returning data within a current SL screen (not SDK) using Customization Mgr VBA.  Did you ever resolve this?

  • CFROTON Profile Picture
    4,710 on at

    Mark,

    Thank you for the update on this post. Are you using SL 2011 or newer version?

    I found a couple reports of this type of message. One noted where the site had modified a standard SL proc to include the "nocount on" entry. Once removed and the proc returned to it's standard version the error went away. The only other reference was where the site copied the SQL query into SQL and found  it failed there also, but returned a better error to troubleshoot with.

    Hope this helps point in a direction to resolve. I checked our bug database and did not find anything reported with this message and what you are trying to accomplish in SL.

    Please let me know if there is anything else we can do to help on this issue.

    Thank you,

    Carolyn

    MSDSL Technical Support

  • Verified answer
    Mark E Profile Picture
    6,451 on at

    It is version SL 2015 CU2.  What I found was that the sql call I was making was a fetch proc that was using SET NOCOUNT ON (as you suggested).  As I looked at other procs used for PVRec, I saw that they don't include SET NOCOUNT ON (I've gotten used to adding it to all my procs).  I removed that from this proc, and it seemed to help.  I also tried it with a SQL call directly from vba (e.g select * from....), and that worked too.  Thanks for confirming the issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans