Is there a way to see what is inside a tableadapter after it has been filled? RRS feed

  • Question

  • Hello everyone, 

    I am having an issue in which I am trying to filter the records contained in a datatable according to a specific parameter. The problem I am having is that I am filling the table adapter according to a specific primary key; however, when the code runs, I get no data. It seems to me that the table adapter is empty. The reason I know this is because I have a dataentry form with a search box. When the user uses the search box all fields on my data entry screen reflect the search except for the fields that are connected to this one specific table adapter.. Those fields turn blank. Is there a way that I can look inside the table adapter to see if there are any rows in there?

    Thursday, August 11, 2011 12:57 AM


  • First, a TableAdapter is just a mechanism to transport data to/from a DataTable - DataTable stores data. You might set a breakpoint in tableadapter's designer generated code (a file under dataset file in Solution Explorer) or you could use a database tool that lets you see what SQL commands are executed against the database (i.e. SQL Server Profiler for SQL Server).
    Miha Markic [MVP C#]
    • Marked as answer by Larcolais Gong Thursday, August 18, 2011 11:18 AM
    Thursday, August 11, 2011 8:38 AM