none
How to increase timeout value on Fill command RRS feed

  • Question

  • I am using VS 2012 and have a report that I am generating using a Fill command from a dataset. After about 15 seconds I get a timeout error. I am familiar with increasing timeout values when using stored procedures using the cmdsql.CommandTimeout command but how/where can you do it with a Fill command from a dataset?

    Thanks.

    Monday, June 15, 2015 1:28 PM

Answers

All replies

  • Hi,

    Since this issue is related to the DataSet, I help you move this case to the ADO.NET DataSet forum for dedicated support.

    Thanks,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, June 16, 2015 8:44 AM
  • There is no public property exposed for CommandTimeout on a typed dataset's TableAdapter. You can either extend the partial TableAdapter class or modify the existing designer generated code to modify CommandTimeout behavior.

    See this example:

    http://blogs.msdn.com/b/runeetv/archive/2008/08/24/typed-dataset-tableadapter-commandtimeout.aspx



    william xifaras

    Tuesday, June 16, 2015 7:23 PM
  • we don't see what kind of dataadapter you use. 

    But normal it is in the SelectCommand property of that.

    YourDataAdapter.SelectCommand.

    Here for the SQLDataAdapter

    https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout(v=vs.110).aspx


    Success
    Cor

    • Proposed as answer by BonnieBMVP Wednesday, June 17, 2015 5:04 AM
    • Marked as answer by Fred BaoModerator Monday, June 22, 2015 3:19 AM
    Tuesday, June 16, 2015 9:34 PM
  • I got the timeout working but I get no data when I run the command (See below):

    Namespace RptSetTableAdapters
        Partial Public Class Qry_SummaryTableAdapter
            Public Property CommandTimeout As Int32
                Get
                    Return Me.CommandCollection(0).CommandTimeout
                End Get
                Set(value As Int32)
                    For Each cmd As SqlCommand In Me.CommandCollection
                        cmd.CommandTimeout = value
                    Next
                End Set
            End Property
        End Class
    End Namespace

    Dim taResponse As New RptSetTableAdapters.Qry_SummaryTableAdapter
    Dim tb As New RptSet.Qry_SummaryDataTable
    taResponse.CommandTimeout = 300
    taResponse.FillSummary(tb)

    Friday, June 19, 2015 4:41 PM
  • Thats a separate issue from your original question. So please mark the question as answered and post a new question regarding filling the dataset including any relevant code.

    william xifaras

    Friday, June 19, 2015 4:46 PM
  • Hello J-Bal,

    Any update? I have marked some replies as answer since I think they are helpful to your original question, if you think it provides no help, please unmark it. And for a new question, please post it to a new thread.

    Thank you for your understanding and support.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, June 22, 2015 3:19 AM
    Moderator