No data returned on dataset fill command RRS feed

  • Question

  • Iam using visual studio 2012 and have created code so that I can increase the timeout value for a Fill command from a dataset (See below). The timeout is working fine but now I am not getting any data returned when the fill command is run. Please advise.

    This code is in the data set designer file:

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

    And this is what I am using in my project to pull the data:

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

    Tuesday, June 23, 2015 12:18 PM


  • Hello J-Bal,

    >>The timeout is working fine but now I am not getting any data returned when the fill command is run. Please advise.

    For this issue, it hard to tell what the caused reason is since we do not your queried table, your used database and your running environment, so I suggest you could:

    1.Check the query table, to ensure there is data in it.

    2.If you are using the sql server database, you trace the sql server event log by the sql server profiler to see if the code generates a correct query and sends the sql statement to database. If not sql server database, I suggest you could find some tools do the similar thing as the sql server profiler.

    3.I added the similar commandtimeout property to the dataadapter object and also set its value to 300, however, it could return data correctly(I do not experience with VB.NET, so I made a test by C# with the sql server database):

    DataSet1TableAdapters.EmployeeTableAdapter da = new DataSet1TableAdapters.EmployeeTableAdapter();
                    da.CommandTimeout = 300;
                    DataSet1.EmployeeDataTable dt = new DataSet1.EmployeeDataTable();

    So, it is confused why it does not work for you and if above points are not the caused reasons, if so, please share a small demo project with us so that we could download it and test it.


    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.

    Wednesday, June 24, 2015 2:49 AM