Tips for moving between development and production databases? - InfoPath Dev
in

InfoPath Dev

Tips for moving between development and production databases?

Last post 10-20-2008 11:55 PM by Graeme. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 10-16-2008 03:03 AM

    Tips for moving between development and production databases?

    The only way I have seen so far is to edit the xml in manifest.xsf and replace the server name on all connection strings with the name of the production server before publishing.  Surely there is a less stoneage way?

  • 10-17-2008 01:23 AM In reply to

    Re: Tips for moving between development and production databases?

    Hi,

    Add a external resource xml file and store all the connections which has to be set while publishing.

    Call the external file which is added in the code. You can make your publishing easy by keeping a file with all the connections given once and it can be used when ever you publish on to Production.

  • 10-20-2008 06:59 AM In reply to

    Re: Tips for moving between development and production databases?

    Not sure what you mean here. The connection string is stored in the xsn file for each control. How do I replace them all by calling an external file?  Can you give an example please?

  • 10-20-2008 11:17 PM In reply to

    Re: Tips for moving between development and production databases?

    Add a secondary xml(let it be ViewOptions.Xml) to your Infopath form. In the ViewOptions.Xml add a SharePointUrl Node in that node place your sharepoint URL to that node.

    for example the viewOptions.XML is:

    <ViewOptions>
     <sharePointFolderUrl>Local Config</sharePointFolderUrl>
    </ViewOptions>

    Now get the viewoptions.XMl dom (let the viewoptions.XMl dom be domViewOptions) into your code for getting the SharePoint URL.Use  the below code for submitting your infopath form to the sharepoint.

     

    public bool SubmitDataToSharePoint()
      {
    string sharePointFolderPath = GetNodeValue(domViewOptions, "/ViewOptions/sharePointFolderUrl");
       try
       {
        DAVAdapter sharePoint = (DAVAdapter)thisXDocument.DataAdapters[submitAdapterName]; 
        sharePoint.FileName = fileName;
        sharePoint.FolderURL = sharePointFolderPath;    
        sharePoint.SubmitData(dataNode);    
       }
       catch(Exception ex)
       {
        string sMessage = FAILED_UNKNOWN;
        
        if(-1 != ex.Message.IndexOf("DAVAdapter"))
         sMessage = FAILED_SUBMIT_SHAREPOINT;
        else if(-1 != ex.Message.IndexOf("validation errors"))
         sMessage = FAILED_SUBMIT_VALIDATION;
            
        Alert(sMessage); 

        return false;
       }   
       return true;
      }


    Like this you can place all your URL's in the ViewOptions.XML and can use that URl's into your code ,instead of changing the Manifest.xsn everytime.

    Chandrakanth/GGKTech
  • 10-20-2008 11:55 PM In reply to

    Re: Tips for moving between development and production databases?

    Ah, but I'm talking about the data retrieval connection strings for filling data into list boxes etc. when the form is opened. Sharepoint is not in the picture.

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