Timeout error during form load - InfoPath Dev
in

InfoPath Dev

Timeout error during form load

Last post 06-12-2014 01:58 AM by Yuraj. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 04-03-2009 04:18 PM

    Timeout error during form load

    I have read through the forums and saw several threads that talked about this topic. In reading them, I came quickly to the conclusion that I haven't learned as much as I thought. I have picked up on form designing and even database connections, but I've hit a problem that probably requires inserting some code, and I'm a serious fish out of water in that department.

    I have a form that several users in my department will be using to record audit findings. To make it easier on them, I created an Access database for populating several of the drop-down lists in the form. The InfoPath form and the Access database are in the same folder on a shared drive. For people on the network, it works fine. However, I have one user that is remote and connecting to the network via VPN. When she attempts to open the form, she gets the error regarding timeout.

    I guess what I need is to know how to increase that timeout, written for an InfoPath user that is still in diapers. Ha!

    Any help will be much appreciated. This isn't my background, but I am a quick study....promise!

  • 04-03-2009 05:29 PM In reply to

    Re: Timeout error during form load

    Hi, and welcome. Are you using InfoPath 2003 or 2007? Your VPN user has access to the shared drive, correct?

    Hilary Stoupa

  • 04-03-2009 09:26 PM In reply to

    Re: Timeout error during form load

    Thanks for the reply. I am using 2003 and yes, the user has access to the shared drive.

  • 04-06-2009 07:23 AM In reply to

    Re: Timeout error during form load

    First, under Tools / Form Options set your programming language to JScript.

    Then, make sure your data connection that is timing out isn't set to query on load. When you walk through the data connection wizard, this is an option on the last screen -- a checkbox that says "Automatically retrieve data when form is opened"

    Next, under Tools / Programming select the On Load Event. This will add an event to your form that will run every time the form is opened. It will also open the Script editor. Your cursor will probably automatically be placed at a line that says "// Write your code here "

    Replace that comment line with:

    var dAdapt = XDocument.DataAdapters["Test1"];
    dAdapt.Timeout = 60; // Increase to 60 seconds - Default is 30
    dAdapt.Query(); // Issue the query

    Everything after the "//" symbols is a comment in the code. The items in bold you are going to need to update with your own values. My data connection is called Test1 -- you need to put the name of your data connection in instead. I've set the timeout to 60 seconds -- you should have your VPN user try this and see if it needs to be adjusted further.

    Hilary Stoupa

  • 04-06-2009 07:28 AM In reply to

    Re: Timeout error during form load

    Awesome! Thanks so much!

  • 07-28-2009 08:39 AM In reply to

    Re: Timeout error during form load

    How do you do this with VB Script?  Thanks
    Filed under:
  • 07-28-2009 09:16 AM In reply to

    Re: Timeout error during form load

    Well, I'd guess:

    Dim dAdapt
    Set dAdapt = XDocument.DataAdapters("Test1")
    dAdapt.Timeout = 60  'Increase to 60 seconds - Default is 30
    dAdapt.Query() 'Issue the query

    Hilary Stoupa

  • 01-06-2010 11:47 AM In reply to

    Re: Timeout error during form load

    We are also having a timeout issue when the infopath form is loading.  This happens apparently because a webservice is taking too long to populate the controls on the page because the users are on slow remote sites.

    I have used the JScript code recommended and I tried both 60 seconds and 120 seconds but we continue to get the message that it has timedout and cannot populate the controls.  The error message is returned in about 40 seconds so it does not look like the timeout is working correctly .

    Does something different need to be done for InfoPath 2007?  Is there another or better solution?

    Thanks in advance.

  • 03-28-2012 07:49 PM In reply to

    Re: Timeout error during form load

    Hello Hilary,

     I am also having timeout when using VPN.  I have tried below using On Load Event and it doesn't seem to have any effect.  Is there something I am missing?  I should also mention I am using ODBC connection to Access dbase.

    function XDocument::OnLoad(eventObj)

    {

    var dAdapt = XDocument.DataAdapters["AssignmentsLookUp_Q"];

    dAdapt.Timeout = 300; // Increase to 300 seconds - Default is 30

    dAdapt.Query(); // Issue the query

     

    var dAdapt = XDocument.DataAdapters["OpportunityNumberLookUp_Q"];

    dAdapt.Timeout = 300; // Increase to 300 seconds - Default is 30

    dAdapt.Query(); // Issue the query

     }

  • 06-12-2014 01:58 AM In reply to

    • Yuraj
    • Not Ranked
    • Joined on 06-09-2014
    • Posts 5

    Re: Timeout error during form load

    Hi Hilary,

     What if the connection which i giving the timed out error is the main connection. In the Wizard for the main connect i don't see any option for "Automatically retrive data when the form is opened". For other input connections i see this option.

Page 1 of 1 (10 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.