Local Secondary Datasource gets "Network Connection Unavailable" - InfoPath Dev
in

InfoPath Dev

Local Secondary Datasource gets "Network Connection Unavailable"

Last post 07-21-2008 11:11 AM by ghinckley. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 07-15-2008 11:39 AM

    • ghinckley
    • Not Ranked
      Male
    • Joined on 07-15-2008
    • Springfield, IL, USA
    • Posts 5

    Local Secondary Datasource gets "Network Connection Unavailable"

     I am using Infopath 2007.  I have an xml file as a secondary datasource.  The form needs to be able to be filled out when the pc is not connected to a network.  Therefore I located the xml file on the local c: drive.  If I open the form when not connected to a network I get the "Network Connection Unavailable" dialog box.  The form works if I click on the "Try to Connect" button.  However this will annoy the user if they have to do this everytime.  I do not want to use a resource file because the data in the xml file may update often.  Also I want the users to be able to update the form or create new forms like it, so I would prefer to not add custom code if possible.  Is there any way to disable the dialog box or capture it and bypass it?  Any other suggestions? 

     

    Thanks

  • 07-15-2008 11:54 AM In reply to

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    Hello and welcome!

    I'm curious -- if you plan to keep the xml file on a local drive -- won't you have to have the same file in the same location on every machine the form will be filled out on? In that case, won't changing that file be a nightmare? If you do add it as a resource, at least you only need to change the resource file and republish your form -- then your data is in a single location.

    Hilary Stoupa

  • 07-15-2008 12:33 PM In reply to

    • ghinckley
    • Not Ranked
      Male
    • Joined on 07-15-2008
    • Springfield, IL, USA
    • Posts 5

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    I forgot to mention the forms are part of another application.  That application will build the xml file on startup from a local database, so it is always current.  I thought about referencing the database directly but I found the database connection stored in the form template.  The local db may not always have the same name, especially during testing.  The db is refreshed with replication.  If I can manipulate the db connection, that would work as well.

  • 07-15-2008 02:19 PM In reply to

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    Have you tried recreating your data connection? I ask because I just put together a quick demo form that uses a local xml file, published it, and while I get a security warning, I didn't get the Network Connection Unavailable warning.

    Hilary Stoupa

  • 07-15-2008 02:43 PM In reply to

    • ghinckley
    • Not Ranked
      Male
    • Joined on 07-15-2008
    • Springfield, IL, USA
    • Posts 5

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    I have.  It works fine as long as I'm connected to the network.  It is when I don't have a network connection that it does it.  I had to create the form as a trusted form so it could read the local file.    I publish it "To a network location".  I publish it from the c: drive to a location on the c: drive so there shouldn't be any network references there.  I clear out the location on the third screen of the publish wizard, but I've published it with the location left in there as well.  It works fine with a network connection, but I get the dialog when the pc is not connected.

  • 07-16-2008 04:52 AM In reply to

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    Wow -- not only that, but in IP 2007, even when I select store a copy for offline use while creating the data connection, I still get the pop-up asking if I want to work offline, which, when the file is local, is plumb annoying! I'll keep my eyes open for a work-around.

    Hilary Stoupa

  • 07-16-2008 05:47 AM In reply to

    • ghinckley
    • Not Ranked
      Male
    • Joined on 07-15-2008
    • Springfield, IL, USA
    • Posts 5

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    Thanks for looking at it.

  • 07-16-2008 05:57 AM In reply to

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

    I actually had another thought -- I'm wondering if the xml file could be added as a resource and then, when the application starts up, perhaps rebuilt? In the form code, or if the form is part of a Visual Studio solution, you may be able to do it from there -- this isn't anything I've personally tried, just conceptual....

    Hilary Stoupa

  • 07-21-2008 11:11 AM In reply to

    • ghinckley
    • Not Ranked
      Male
    • Joined on 07-15-2008
    • Springfield, IL, USA
    • Posts 5

    Re: Local Secondary Datasource gets "Network Connection Unavailable"

     I tried the resource file and still get the message when the network is unavailable.  I just added the data as an optional part of the main datasource schema.  I then load it when the form needs it otherwise I leave it off. I totally removed the secondary datasource.

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