How to Publish Web-Based Infopath Form directly to SQL Server - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

How to Publish Web-Based Infopath Form directly to SQL Server

Last post 04-14-2010 03:22 PM by ErnestoM. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 04-13-2010 10:41 AM

    How to Publish Web-Based Infopath Form directly to SQL Server

    Greetings!  New to the tool.  Apologies if these are repeated elsewhere in the forum.  Please redirect me if so. 

    Issue 1:  Trying to set up a Web-Based Infopath Form to submit directly to a SQL Server database.  I configured the form submit to use the SubmitDocument web service, now where do I specify which Document Type in DAT to use? 

    Issue 2: In DAT, I can map the Document Type to the database and I can fill out a new form from within the Documents tab but the new form does not submit to the database despite having the necessary SQL Server permissions to do so and does not show up under Import Documents in the Documents tab. 

    Thanks.

     

  • 04-13-2010 11:10 AM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Hi, and welcome to the Qdabra world.

    I would suggest you walk thru our Getting Started guide: http://www.infopathdev.com/files/folders/core_documents/entry33862.aspx

    In it you'll find the basics: creating the submit connection, creating a doctype, configuring a SQL mapping, etc. Until issue 1 is solved, issue 2 cannot be addressed.

    If you run into questions when following the steps, let us know. Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-13-2010 12:54 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Thanks Ernesto.  The Expense Report example works fine.  And my browser based form works fine when submitted through DAT.  Just can't seem to get the form data into the SQL Server database when submitted from the Form Library in Sharepoint.  What am I missing?

     

  • 04-13-2010 01:03 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    When the form is submitted from the Sharepoint form library, does it show up in the Documents tab in DAT?

    If yes, do you get any errors when you click Reshred All in the Documents tab?

    Could you also attach a screenshot of the Database mapping tab in DAT?

    If you see any errors in the Qdabra eventvwr log, please post them.

    Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-13-2010 01:21 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Thanks Ernesto.  Working fine now.  Forgot the little matter of the Document Type Name in the submit.

  • 04-14-2010 06:43 AM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

     btw what threw me was this line in the Getting Started Guide:

    "a. Ignore the first parameter, called tns:docTypeName. It will default to the DocType of the form."

    In my form I had to imbed the DocTypeName from DAT in the Infopath form.  Obviously that field is the key to having the form route to the correct Document Type Configuration.    

  • 04-14-2010 06:57 AM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Hi, I'm sorry this caused an issue for you. Just to clarify, DBXL will detect the doctypename in most cases. There are some (less common) scenarios, like this one, that do require declaring the doctypename. Can you tell us more about your scenario so that we may document it? Does your form have code? What version of InfoPath are you using? Any other details would be great. Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-14-2010 07:08 AM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Not all.  My fault.  I am using Infopath 2007 and the form contains no code.  The Document Type in DAT simply didn't match the name of the Infopath file so it didn't get routed correctly.  Newb mistake. 

  • 04-14-2010 07:26 AM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Don't feel bad. I don't think it's a newb mistake (and, even if it is, we all make them, we're all newbs at one point); but I would like to get to the bottom of it so we may help other customers in the future. :)

    The name of the XSN doesn't need to match the name of the Document Type. That shouldn't be the issue. Perhaps there is a network issue at play here preventing DBXL from determining the name of the doctype. If you can attach your XSN I can check the submit data connection and maybe try to reproduce the issue with your form on my machine.

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-14-2010 01:59 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Hello Ernesto,

    This post caught my eye because I was about to post exactly the same question. I've completed the "Getting Started" tutorial and was successfully able to write to my database. However the scenario presented in the tutorial isn't quite what I want to achieve. I want to end up with a list of forms in SharePoint which users complete using only their browser. I'm not really concerned with saving a copy of the completed form, I just want to use the form as a nice front-end for users to enable them to submit data directly to an SQL database. I decided to take the form I created in the tutorial and publish it to SharePoint so that I could be sure it would launch successfully in the browser. The form worked fine in the browser and when i clicked the Submit button it told me that my data had been successfully submitted, but a quick check of the database revealed that this wasn't the case.

    The "problem" isn't really a configuration issue - I believe everything is working as you intended but I'm not sure I really understand why it works the way it does. Do you have a step by step guide which explains clearly how to configure DBXL when you want to use it purely to submit data to an SQL database but without saving the actual completed form? Thanks for your time.

  • 04-14-2010 02:11 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Hi,

    The xml data needs to be submitted/stored in DBXL so that it can be then mapped into SQL. This means that the form cannot be published to SharePoint from InfoPath; DBXL needs to 'publish' the form to SharePoint via DAT (to retain "ownership" of the xsn). I believe this is covered in Getting Started, but the following document might also prove helpful: http://www.infopathdev.com/files/folders/sharepoint/entry35609.aspx

    If you're following the steps in the documentation and the result is not what you expected, the next step is to take a look at your XSN. If you cannot attach it to the forum post, please email it to support at qdabra dot com and we'll be glad to take a look.

    Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 04-14-2010 02:28 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Thanks! I'll take a look at that and see if it enlightens me. I didn't really pick up from the tutorial that the DAT actually replaced the "publish to SharePoint" functionality of InfoPath - does it actually say that or is it implied? All this stuff is new to me so unless something is printed in 6-foot high letters I don't always notice. :-)

  • 04-14-2010 02:32 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    This helps me understand why the guide didn't work for me.  I published the form to Sharepoint from Infopath.  In order to make certain the form was routed to the correct document type in DAT I had to add a field to my main data source and give it a default value which matched the document type name from DAT.  Then when in the parameter section of the Data Connection Wiz for the form submit I mapped the tns:docTypeName to that field.  And it worked.   Didn't realize this is supposed to be accomplished through the Sharepoint mapping tab of DAT.   Thought the Sharepoint tab was used to route submitted forms to a Sharepoint library and I wanted to use Sharepoint as a front end only, no form storage.

  • 04-14-2010 02:55 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    Hi dtaylerrr, I think there's always a bit of a "gap" between the user of a solution and the developer of it. Essentially we are taking in different languages and the trick is to try and explain clearly what we mean without introducing too much confusion. I think that your experience and mine does suggest that a few improvements to the "Getting Started" tutorial could be made to help newbies like you and I. Most people will find DBXL when they realise that they can't submit to an SQL database using a web-based form (I was quite shocked it couldn't do this). They'll then discover that it is possible if you use Web Services. I didn't know what a Web Service was but when I found out that you needed something like Visual Studio to create one i lost hope that i would ever be able to achieve the simple web-based solution I was looking for. Isn't the whole point of SharePoint/InfoPath that it enables non-programmers to create business solutions? DBXL looks like it will provide this missing functionality but I don't find it that easy to pick up as some of the documentation is too vague if you are new to this subject area. I'd really like to write up the process of submitting to a database from an InfoPath web-based form once I've got it clear in my mind. There's little in the way of clear information about how to do this on the web and yet on a recent InfoPath course I atteneded 90% of students wanted to know exactly how to do this (the tutor couldn't tell us). I'd like to write it up from a non-technical perspective of course! :-) Thanks for taking the time to make your point - very interesting.

  • 04-14-2010 03:22 PM In reply to

    Re: How to Publish Web-Based Infopath Form directly to SQL Server

    The Getting Started guide aims to quickly expose a new user to the basic functionality of DBXL. The goal is to give new users a quick, step-by-step tutorial covering basic functionality, but without drowning in too much information. After becoming comfortable with Getting Started, you can continue building on your DBXL experience with other documents (like the one on IPFS-enabling a form, mentioned above).

    As you go through these documents, make sure to send your suggestions to support at qdabra dot com so that we may improve them in the future. If you're striving for a scenario that is not covered by the existing documentation, also let us know so that we may try to address it.

    Thanks!

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


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