none
DB-LIB Error 10038: Attempt to initiate a new SQL Server operation with results pending

    Question

  • We have a program getting errors regarding DB-LIBRARY error, seems to be application error, but not sure, would like to ask experts here. a reference I found is http://msdn.microsoft.com/en-us/library/aa936949(v=sql.80).aspx, saying if application fails to call dbresults until no more results, it will give 10038 error.

    12/02/2011 15:11:37 2964 DB-LIB Error 10038: Attempt to initiate a new SQL Server operation with results pending.: Attempt to initiate a new SQL Server operation with results pending. Severity: 7

    Monday, December 05, 2011 5:09 PM

Answers

  • Hi George Zhou,

    >> DB-LIB Error 10038: Attempt to initiate a new SQL Server operation with results pending.: Attempt to initiate a new SQL Server operation with results pending. Severity: 7

    According to the error message you provided, which might be related to various reasons. 

    It might be related to the results of the current Transact-SQL statement ready for processing. After dbresults returns SUCCEED, column Meta data for the current result set is available. Your application should call dbresults until it returns NO_MORE_RESULTS. If your program fails to do this, the DB-Library error message 10038 "Results Pending" occurs the next time that DBPROCESS is used.

    Meanwhile all the result sets are not processed completely and you attempt to send another query to SQL Server using the same connection you will receive the following DB-Library 10038 error.
    More information , please refer to INF: Result Processing for SQL Server: http://support.microsoft.com/kb/165951

    Although it may be related to the server does not always terminate the batch in a deadlock situation. If the batch is not canceled, any attempt to submit a new batch can result in a DB-Library error 10038 "Results Pending".
    More information, please refer to Error 1205 http://msdn.microsoft.com/en-us/library/aa258770(v=SQL.80).aspx


    Regards, Amber zhang
    Wednesday, December 07, 2011 5:03 AM
    Moderator

All replies

  • which version of sql server you are using.
    Please mark the post as answered to help others to choose the best. chandra sekhar pathivada | www.calsql.com (SQL Server Community Website)
    Monday, December 05, 2011 6:52 PM
  • SQL 2008 SP1 Standard on Windows 2008
    Monday, December 05, 2011 7:07 PM
  • Perhaps might be you have to use  dbcancel() or sqlcancel() commands to overcome such DB library error as per the KB below :

    http://support.microsoft.com/kb/117143/EN-US 


    Think more deeply of performance terms
    Monday, December 05, 2011 7:26 PM
  • Hi George Zhou,

    >> DB-LIB Error 10038: Attempt to initiate a new SQL Server operation with results pending.: Attempt to initiate a new SQL Server operation with results pending. Severity: 7

    According to the error message you provided, which might be related to various reasons. 

    It might be related to the results of the current Transact-SQL statement ready for processing. After dbresults returns SUCCEED, column Meta data for the current result set is available. Your application should call dbresults until it returns NO_MORE_RESULTS. If your program fails to do this, the DB-Library error message 10038 "Results Pending" occurs the next time that DBPROCESS is used.

    Meanwhile all the result sets are not processed completely and you attempt to send another query to SQL Server using the same connection you will receive the following DB-Library 10038 error.
    More information , please refer to INF: Result Processing for SQL Server: http://support.microsoft.com/kb/165951

    Although it may be related to the server does not always terminate the batch in a deadlock situation. If the batch is not canceled, any attempt to submit a new batch can result in a DB-Library error 10038 "Results Pending".
    More information, please refer to Error 1205 http://msdn.microsoft.com/en-us/library/aa258770(v=SQL.80).aspx


    Regards, Amber zhang
    Wednesday, December 07, 2011 5:03 AM
    Moderator