none
Bug ? in .NET 3.5 SP1 RRS feed

  • Question

  • Hi,
    I think I've found a bug in ADO.NET using .NET Framework 3.5.  My system is WinXP x64, and I'm running SQL Server 2008 Std.  The bug presents itself as a dropped connection from my web application (that uses connection pooling).  I can cause the problem to happen by performing an update using a DataAdapter with a DataSet that has one row changed (only one table in the DataSet).  The table in my database has several columns, some of which are of type 'datetime'.  When I change the value in the dataset's table's row to DateTime.MinValue and then call adapter.Update(dataset), the connection to SQL Server closes.  There is a corresponding pair of errors logged in SQL Server:
    --------------------------------
    Date  12/11/2009 2:26:37 PM
    Log  SQL Server (Current - 12/11/2009 4:59:00 PM)
    Source  spid51
    Message
    The client was unable to reuse a session with SPID 51, which had been reset for connection pooling. The failure ID is 29. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.
    ------------------
    and:
    ------------------
    Date  12/11/2009 2:26:37 PM
    Log  SQL Server (Current - 12/11/2009 4:59:00 PM)
    Source  spid51
    Message
    Error: 18056, Severity: 20, State: 29.
    ------------------

    When I use an alternate method for performing the same update ( opening a new connection, setting the command text as an SQL statement with parameters, adding parameters and setting their values, then calling command.ExecuteNonQuery(), I get a real error message that states the datetime value is out of range.

    When using the DataAdapter (the first example above), shouldn't the call just return an error instead of generating SQL Server errors that cause the connection to be dropped?

    Thanks

    Thursday, November 12, 2009 10:06 PM

All replies

  • Hi def2,

     

    Welcome to MSDN Forums!

     

    The issue that you reported is more related to ADO.NET 2.0, so I move this thread to ADO.NET Data Providers forum.  

     

    For the issue, I will have a further investigation and keep you informed of any updated information.  Thanks for your patient!

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Monday, November 16, 2009 10:24 AM
    Moderator
  • Hard to say what is going on with the first case, but in a second one it looks like your code has an incorrectly constructed SQL statement. Do you concatenate datetime values to the SQL statement? Can you post your SQL statement here?
    Val Mazur (MVP) http://www.xporttools.net
    Monday, November 16, 2009 11:12 AM
    Moderator
  • In addition to SQL statements, please post the .Net code to help us investigate why the pooled connection behaves not as expected.

    Monday, November 16, 2009 8:13 PM
  • Hi def2,

     

    As VMazur and Nissim suggested, could you please provide us with more detailed information and how to repro the problem?   Thanks!

     

    Have a nice day!

     

     

    Best Regards,
    Lingzhi Sun

    MSDN Subscriber Support in Forum

    If you have any feedback on our support, please contact msdnmg@microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, November 17, 2009 1:08 AM
    Moderator
  • We are changing the issue type to “General Discussion” because you have not followed up with the necessary information. If you have more time to look at the issue and provide more information, please feel free to change the issue type back to “Question” by opening the Options list at the top of the post window, and changing the type. If the issue is resolved, we will appreciate it if you can share the solution so that the answer can be found and used by other community members having similar questions.

    Thank you!


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, November 26, 2009 12:37 AM
    Moderator