_dsHelp = Common.GetChimpHelp(this.Name)
In the Common project the code is this:
Code: Select all
dsSvr = new DataSet();
string conString = System.Configuration.ConfigurationManager.AppSettings["DP2"];
SqlConnection con = new SqlConnection(conString);
con.Open();
SqlCommand cmd = new SqlCommand("spQ_ChimpHelpByFormName", con);
cmd.CommandTimeout = 300;
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@FormName", _formName);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dsSvr);
con.Dispose();
return (dsSvr);
If I move the code from Common to the child form, I don't get this error. I am not sure what to do to fix the code
so I can have it in the Common project and not get the Event handler condition.
Following is the allocation stack:
System.Windows.Forms!System.Windows.Forms.BindingContext.EnsureListManager( object,string )
System.Windows.Forms!System.Windows.Forms.BindingContext.get_Item( object,string )
Infragistics2.Win.UltraWinGrid.v5.3!Infragistics.Win.UltraWinGrid.UltraGridBase.Set_ListManager( object,string )
Infragistics2.Win.UltraWinGrid.v5.3!Infragistics.Win.UltraWinGrid.UltraGridBase.set_DataSource( object )
HRIChimp.Win.SubjectInfo!HRIChimp.Win.SubjectInfo.SubjectInfo.PopulateHelp() SubjectInfo.cs
HRIChimp.Win.SubjectInfo!HRIChimp.Win.SubjectInfo.SubjectInfo.SubjectInfo_Load( object,EventArgs ) SubjectInfo.cs
System.Windows.Forms!System.Windows.Forms.Form.OnLoad( EventArgs )
HRIChimp.Win.Common!HRIChimp.Win.BaseForm.OnLoad( EventArgs ) BaseForm.cs
System.Windows.Forms!System.Windows.Forms.Form.OnCreateControl()
System.Windows.Forms!System.Windows.Forms.Control.CreateControl( bool )
System.Windows.Forms!System.Windows.Forms.Control.CreateControl()
System.Windows.Forms!System.Windows.Forms.Control.WmShowWindow( ref Message )
System.Windows.Forms!System.Windows.Forms.Control.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.ScrollableControl.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.ContainerControl.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.Form.WmShowWindow( ref Message )
System.Windows.Forms!System.Windows.Forms.Form.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.Control.ControlNativeWindow.OnMessage( ref Message )
System.Windows.Forms!System.Windows.Forms.Control.ControlNativeWindow.WndProc( ref Message )
System.Windows.Forms!System.Windows.Forms.NativeWindow.Callback( IntPtr,int,IntPtr,IntPtr )
[Native to managed transition]
[Managed to native transition]
System.Windows.Forms!System.Windows.Forms.UnsafeNativeMethods.IntCreateWindowEx( int,string,string,int,int,int,int,int,HandleRef,HandleRef,HandleRef,object )
System.Windows.Forms!System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx( int,string,string,int,int,int,int,int,HandleRef,HandleRef,HandleRef,object )
System.Windows.Forms!System.Windows.Forms.NativeWindow.CreateHandle( CreateParams )
[Truncated]
Thanks,
T