dc

dc

  • NA
  • 663
  • 0

Windows form response problem

Aug 7 2011 6:23 PM
The problem: I would like to fix a C#.net 2008 windows form application. When a request is suppose to return a large number of rows, the application looks like it is going to not finish. What you see is a window showing the application is not responding. You do not see the round circle showing it is timing. If you wait for about 20 extra seconds, you will see all the results you requested.
 
I would prefer to see the circle going around for awhile. (Possibly something I change to tell the person to wait).
 
Recently:I changed the stored procedure to use 'nolock' on a few tables that are joined. This way I at least get the results I want.
 
The question is: What .net feature would I need to change for thsi problem to go away?
 
This application uses a data adapter visual designer to connect to a sql server 2008 R2 database.
 
For additioanl information, the following is some of the code that is autogenerated:
 
 [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  public partial class brw_TableAdapter : global::System.ComponentModel.Component {
 
  private global::System.Data.SqlClient.SqlDataAdapter _adapter;
 
  private global::System.Data.SqlClient.SqlConnection _connection;
 
  private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
 
  private bool _clearBeforeFill;
 
  [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  public brw_TableAdapter() {
  this.ClearBeforeFill = true;
  }
 
 
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
  [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
  public virtual Browser.brw_DataTable GetDataTable(global::System.Nullable<int> Id, string CO) {
  this.Adapter.SelectCommand = this.CommandCollection[0];
  if ((submissionId.HasValue == true)) {
  this.Adapter.SelectCommand.Parameters[1].Value = ((int)(CO.Value));
  }
  else {
  this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value;
  }
 
  CO.brw_DataTable dataTable = new CO.brw_DataTable();
  this.Adapter.Fill(dataTable);
  return dataTable;

Answers (1)