How to use Web Services to Submit and Get data from SQL - InfoPath Dev
in

InfoPath Dev

How to use Web Services to Submit and Get data from SQL

Last post 09-09-2009 10:57 AM by ErnestoM. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 03-16-2009 02:44 PM

    How to use Web Services to Submit and Get data from SQL

    Hello all,

    I am entirely new to InfoPath, SQL, and Web Services and creating a POC example for a patient healthcare record.  I have a form that is based on an a pre-defined schema with two views. 

    1. I want to use .NET Web Services to allow the data in the form (once filled out) to be submitted to a Web Service which sends it to a SQL database which has one or more tables to hold the values (I want to use more than one table, but based on my research that seems to complicate the coding quite a bit). 

    2. I also want to use a Web Service to query the SQL database table (or tables) when an input value is put into the form (for instance patient name which would NOT be the primary key of a SQL table) and then bring in the other values to the InfoPath fields.

    What I have been looking into/trying is as follows: 

    1. I DO NOT want to use native SQL Web services as they are being phased out. 

    2. I have tried to transmit the entire file by first creating stored XML schema collections in SQL and then a Web Service with two methods (one for GET, one for UPDATE) based on http://blogs.msdn.com/infopath/archive/2007/02/05/infopath-and-yukon-the-details.aspx.  When creating the data connections and buttons, I get a "success" message from InfoPath after clicking "submit" or "get" but it doesn't seem to be storing the record and it definately does not fill in the fields.

    3. I have been trying to submit the data a SQL table/tables and also get it from those tables to fill the form out.  I found references for using xsd.exe as part of Visual Studio command prompt to create classes for my schema.  I am guessing that this would be used to map between schema elements and fields in the database.  However, I have not found a full example that shows how to BOTH store/submit and get data from tables using this. 

    If possible, I would like code examples/advice on the best method to use for a beginner with little programming background.  If the table method is recommended, should I put all the values in one table or are multiple tables ok? Any help is much appreciated! 

  • 03-16-2009 05:46 PM In reply to

    Re: How to use Web Services to Submit and Get data from SQL

    Hey there Jprow,

    Qdabra (the company that runs this site) has a handy suite of webservices called DBXL that can do everything you just described in your post and more.  With DBXL, mapping form data to multiple SQL tables, and updating the data when the form is modified, is a breeze.

    DBXL has a free trial version and I recommend trying it out.  Please let me know if you need any help getting up and running.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-17-2009 08:53 AM In reply to

    Re: How to use Web Services to Submit and Get data from SQL

    Thank you for the advice.  I am going to install and test out the software to see if it meets my needs. 

    I do have a few questions that maybe you can answer:

    1.This is for a college project due May 1.  When the trial expires will my demonstration still function or will the software need purchased? 

    2.Also, does this do EVERYTHING behind the scenes or can I still view and access some of the underlying code such as the asmx Web Service or WSDL for learning purposes once I get the demonstration up and running?

  • 03-17-2009 07:30 PM In reply to

    Re: How to use Web Services to Submit and Get data from SQL

    Hello again,

    I believe the current trial version of DBXL expires on June 1, which should carry you past the end of your project.  If that is not the case, please let me know.

    Since DBXL is a commercial product, none of the source code is publicly available.  You are welcome to look at the WSDL in a browser by using an address like http://machinename/QdabraWebService/DbxlDocumentService.asmx?WSDL, but as it is auto-generated by .NET, I don't think it would be terribly interesting.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-18-2009 03:59 PM In reply to

    Re: How to use Web Services to Submit and Get data from SQL

    I get a very generic error when trying to install the trial on my Vista machine.... have you or anyone else seen this before and knows how to fix it?  I receive this same error on a Windows Server 2003 machine and have yet to try an XP machine.

     "The installer has encountered an unexpected error installing this package.  This may indicate a problem with this package.  The error code is 2869"  All it says in the event log is that MsiInstaller reports "installation failed" with event ID 1033.

    I hope to test out this product, but it is looking doubtful.....

     

  • 03-18-2009 04:23 PM In reply to

    Re: How to use Web Services to Submit and Get data from SQL

    Further information:

    On my Vista machine, UAC is disabled, the account I am using is a member of Administrators and a member of the SQL groups, the ASPNET user is also a member of the SQL groups, it is a local machine not on a domain

    When i put the command "msiexec.exe /i "C:\[directory where QdabraServiceSetup.msi file is]\QdabraServiceSetup.msi" into the cmd as administrator I get a window that pops up and says "This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vender or verify that this is a valid windows package.

  • 09-09-2009 10:57 AM In reply to

    Re: How to use Web Services to Submit and Get data from SQL

    I don't think it's enough for the user to be a member of the Administrators group. You have to Run As Administrator.

    Can you post your Qdabra DBXL questions in the support forum? This will make sure we address them quickly. Sorry for the late reply!

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


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