Infopath crashes when I do search - InfoPath Dev
in

InfoPath Dev

Infopath crashes when I do search

Last post 11-07-2005 01:29 PM by vankireddy99. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 11-07-2005 12:42 PM

    Infopath crashes when I do search

    HI,

    I am using secondary data source (web service) for connecting to database from InfoPath. By default with out using any search criteria, I am pulling all the data from database. I am giving provision to search. Here I am providing 2 text boxes with Search button. As soon we click the Search button, I am passing the search criteria values to web services using .NET code behind and i am restricting the data to search criteria. This worked fine in 2 days. After that we try to search , it is giving error saying that "Microsoft InfoPath encountered a problem and needs to close.".

    I am using .NET code behind for all button actions and written all business logic in .net. I debugged the code and checked it, everything is fine in the code, but still giving this error.

    I need to fix this issue ASAP, client is asking me to fix this immediately.

    Please help me to fix this issue. Quick help is highly appreciated.

    Thanks,
    Amar
  • 11-07-2005 01:13 PM In reply to

    Re: Infopath crashes when I do search

    Hi,

    You may want to post code if you need help (under the search button for example).

    Regards,

    Franck Dauché
  • 11-07-2005 01:29 PM In reply to

    Re: Infopath crashes when I do search

    // The following function handler is created by Microsoft Office InfoPath. Do not
    // modify the type or number of arguments.
    [InfoPathEventHandler(MatchPath="ClientSearch", EventType=InfoPathEventType.OnClick)]
    public void ClientSearch_OnClick(DocActionEvent e)
    {
    try
    {
    string sClientNumber = getNodeValue(e.Source, "/my:myFields/my:SClientNumber");
    string sClientName = getNodeValue(e.Source, "/my:myFields/my:SClientName");

    thisXDocument.View.SwitchView(aViewName[2]);

    setNodeValue(domClientSearch, "//dfs:queryFields/tns:ClientList/tns:sClientNumber", sClientNumber);
    setNodeValue(domClientSearch, "//dfs:queryFields/tns:ClientList/tns:sClientName", sClientName);

    WebServiceAdapter2 oClientListAdapter =(WebServiceAdapter2) thisXDocument.DataAdapters["ClientList"];
    thisXDocument.Errors.DeleteAll();
    oClientListAdapter.Query();
    }
    catch (Exception ex)
    {
    thisXDocument.UI.Alert(ex.Message);
    }
    }
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.