Uploaded image for project: 'Spring.NET'
  1. Spring.NET
  2. SPRNET-1398

Command timeout can't be set to infinite value

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.1
    • Component/s: Spring-NET-DA
    • Labels:
      None

      Description

      Our application is calling stored procedure in database via Odbc-2.0. This procedure takes long time so we would like to disable timeout feature.
      According to this http://msdn.microsoft.com/en-us/library/system.data.odbc.odbccommand.commandtimeout.aspx we should set 0.
      However when we set AdoTemplate.CommandTimeout = 0 then we do not have any change - timeout occurs after 30s.
      We do not have any timeout set at the transaction level.
      Also we know that ODBC driver is ok because plain ADO.NET (without Spring) application behaves correctly.
      I've found workaround: AdoTemplate.CommandTimeout = 999999 works as expected.
      This is probably because in ConnectionUtils.ApplyTransactionTimeout I see following code:
      if (timeout > 0)

      { // No current transaction timeout -> apply specified value. command.CommandTimeout = timeout; }

        Attachments

          Activity

            People

            • Assignee:
              mark.pollack Mark Pollack
              Reporter:
              robsosno Robert Sosnowski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: