databinding

Discussion in 'ASP .Net Datagrid Control' started by Doug Durrett, Aug 3, 2006.

  1. Doug Durrett

    Doug Durrett Guest

    I'm having an issue and wanted to pass by everyone to see what you think.
    Here is my code.



    searchs = new
    Maritz.Learning.HP.Callcenter.BusinessServices.Searchs(base.ConnectionString);



    searchs.Search(this.FirstNameTextbox.Text, this.LastNameTextbox.Text,

    this.EmailTextbox.Text, this.CityTextBox.Text, this.StateTextBox.Text,
    this.ZipTextBox.Text, this.IssueTextBox.Text, this.CompanyNameTextBox.Text,
    Convert.ToInt32(this.SiteDropDownList.SelectedValue.ToString()),
    Convert.ToInt32(this.StatusDropDownList.SelectedValue.ToString()));



    this.ResultsDataGrid.DataSource = searchs;



    this.ResultsDataGrid.DataBind();





    This is on a click event from a web page. When the button is clicked the
    searchs object is created and populated from a sproc. Then simply set the
    datasource and bind it. This works perfectly, however, if I click the
    button a 2nd, 3rd, or 4th time (usually on the 4th click) everything works
    until I get to the DataBind(). The system will hang on that line and
    produce this error.

    Server Error in '/' Application.

    --------------------------------------------------------------------------------

    Failed to open a data connection
    Server=FENSQLLIBD01;database=HPCustomerSupport;user
    id=HPCustomerSupport;password=*2rT44Y* - please check the connection string
    and security settings!
    Description: An unhandled exception occurred during the execution of the
    current web request. Please review the stack trace for more information
    about the error and where it originated in the code.

    Exception Details: System.Exception: Failed to open a data connection
    Server=FENSQLLIBD01;database=HPCustomerSupport;user
    id=HPCustomerSupport;password=*2rT44Y* - please check the connection string
    and security settings!

    Source Error:

    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.



    Stack Trace:

    [Exception: Failed to open a data connection
    Server=FENSQLLIBD01;database=HPCustomerSupport;user
    id=HPCustomerSupport;password=*2rT44Y* - please check the connection string
    and security settings!]
    Maritz.Learning.HP.Web.CallCenter.Tracking.searchtask.SearchButton_Click(Object
    sender, EventArgs e) in c:\inetpub\wwwroot\hplogging\search.aspx.cs:90
    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    eventArgument) +57
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl,
    String eventArgument) +18
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    System.Web.UI.Page.ProcessRequestMain() +1277




    --------------------------------------------------------------------------------

    Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
    Version:1.1.4322.573



    Have you ever seen anything like this? Thanks in advance.
    Doug Durrett, Aug 3, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dbuchanan
    Replies:
    3
    Views:
    682
    Cor Ligthert [MVP]
    Feb 1, 2006
  2. neil m
    Replies:
    3
    Views:
    483
    Jeff Louie
    Jun 28, 2003
  3. Christof Nordiek

    DataBinding with Array

    Christof Nordiek, Jul 1, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,790
    Marina
    Jul 1, 2003
  4. jobs
    Replies:
    0
    Views:
    1,599
  5. Earl Teigrob
    Replies:
    1
    Views:
    394
    Shravan
    Mar 1, 2004
Loading...

Share This Page