Dynamic Data Source connection strings? - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Dynamic Data Source connection strings?

Last post 11-09-2010 06:21 AM by Caeanis. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 12-02-2009 10:04 AM

    Dynamic Data Source connection strings?

    Greetings.  First post on this site for me.  I have 15 InfoPath forms that I would like to deploy into multiple SharePoint environments.  The forms each contain multiple data sources whose connection strings will vary based on where the forms are deployed.  I don't want to have to go into each form and manually change all of the data source connection strings prior to publishing the forms in the new environments.  A few questions from my brainstorming session on the best way to accomplish this:

    1. Can data source connection strings be dynamic and set prior to method execution time?
    2. Can data source connection strings use relative URL's rather than absolute?

    3. If none, of the above is true, I could potentially write a utility that extracts the .xsn into its sub-parts, programmatically open the .xsf file, manipulate the .xsf, and then rejoin the files to one .xsn file.  Is this a viable option?  Is this the only option?  If possible, is the .xsf file the only one that contains the URL for the data connection (it is the only one I have found that does but not 100%)?

    Thanks in advance for any input.

  • 12-02-2009 09:20 PM In reply to

    Re: Dynamic Data Source connection strings?

    Hi Ike,

    1. Yes, but you have to write code.

    2. Yes, you can either use code, or convert your data connections to Universal Data Connections (XML files) and change those for each install (much easier). On the data connections dialog, there is a convert. This requires IP2007 and SharePoint 2007,

    3. We have written the utility to do this. The XSF is the only place where the connection strings live (unless you have code which could include them).

    Patrick Halstead
    Project Manager at Qdabra
  • 12-03-2009 04:57 AM In reply to

    Re: Dynamic Data Source connection strings?

    Thank you for the reply Patrick.  I wasn't aware of the UDC functionality.  Also, when you say "we have written the utilility", who is "we"?  Is the utility publically available? 

  • 12-03-2009 05:46 AM In reply to

    Re: Dynamic Data Source connection strings?

    Hi Ike,

    UDC files still need to be fixed up, but they allow you to quickly change data connections from test Web Services or database to production ones (by just changing the UDC file) so they are beneficial for that. Also, multiple solutions can reuse them which saves time when creating multiple InfoPath forms. 

    "We" is Qdabra.com, the site that funds this forum. The "utility" is bundled in our DBXL product. We have not extracted it as a separate tool, but that seems like a good idea. Anyway, the code fixes up connection strings in the XSF when you publish to DBXL and DBXL publishes the XSN to SharePoint.  

    Cheers

    Patrick Halstead
    Project Manager at Qdabra
  • 11-09-2010 06:21 AM In reply to

    Re: Dynamic Data Source connection strings?

     Hello Patrick,

     I found this thread after posting a similar question.  I am using Infopath and Sharepoint 2007 I have data in an XML file.  The size of the file seems to affect the speed which the form is opening and can be interacted with.  I would like to use a web service I wrote to pull specific nodes relevant to the manager who is logging in.  I've written the web service, gotten permission from our Sharepoint admin to post it to our site, and it does pull the data, I'm just not sure how to configure the Infopath form to pull the data and populate it.  When I try to set up a data connection to the web service it shows a single output field in the data source pane.  This is probably because the web service returns an xml node and I didn't specify a schema or something like that.  I am just learning this technology and admit I don't know much.  I am trying to find examples which I might adapt for this project.  Do you have suggestions?  Thank you in advance for your consideration.

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