Stored Procedures SQL Tie-ins! - InfoPath Dev
in

InfoPath Dev

Stored Procedures SQL Tie-ins!

Last post 06-14-2010 05:21 AM by sql_dan. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 06-14-2010 01:21 AM

    • sql_dan
    • Not Ranked
      Male
    • Joined on 11-30-2009
    • Sheffield, UK
    • Posts 5

    Stored Procedures SQL Tie-ins!

    Morning All,

    I have been puzzling over this for about a week now and I feel that my head may expolde!
    I have been tasked with creating an Electronic Form to capture all items used in each procedure we complete.

    Currently this is captured on paper preference sheets which I manually upload into the SQL database using a series of Stored Procedures.

    Within the Database I am only updating 3 tables which are:

    ProcedureConsCode
    ProcedureConsQty
    ProcedureConsCost

    In essence I have one Stored Procedure per procedure which stores all of the default stock codes that are used in the procedure.
    This will then update the 'ProcedureConsCode' table and has space at the end for any ancillary items used.

    In a SQL Query I am defining all parameters for the 'ProcedureConsQty' table and also defining any of the ancillary stock code and appropriate quantites.

    The SQL Query then runs 3 Stored Procedures, 1 for each of the tables I am updating based on the procedure that is being inputted.

    1. SP_PCode - This updates the table with the default stock codes as well as the ancillary items used
    2. SP_PQty - This updates the quantities used for each item
    3. SP_PCost - This looks the stock code in ProcedureConsCode up against the 'Consumables' table and multiplies the item cost by the quantity.

    I am wanting to migrate this into an InfoPath form but have never done any programming work within InfoPath before.
    I have read through the 'Fun with Sequential Forms' that Hilary wrote: http://www.infopathdev.com/blogs/hilary/archive/2008/11/21/fun-with-sequential-form-ids-sql-and-sprocs.aspx and tried to mimic it directly without success.

    I am good with SQL but not really any other language. I have also built InfoPath forms before but nothing this complex. If it helps I have access to InfoPath 2003/2007 & 2010 (Beta).
    If anyone can help shed some light on this I would be eternally grateful!

    I really hope this all makes sense to you, I just don't see what I am missing!

    Thanks for looking! Let me know if you need any further clarification!

    Dan
    If you can't sleep at night, it's not the coffee it's the bunk!
  • 06-14-2010 05:13 AM In reply to

    • Prasad
    • Not Ranked
    • Joined on 04-29-2009
    • Hyderabad
    • Posts 19

    Re: Stored Procedures SQL Tie-ins!

    Setup a secondary data connection with sql db and use it to populate. 

    Regards,
    P V V S V Prasad
    Invesco
    MyBolg
  • 06-14-2010 05:21 AM In reply to

    • sql_dan
    • Not Ranked
      Male
    • Joined on 11-30-2009
    • Sheffield, UK
    • Posts 5

    Re: Stored Procedures SQL Tie-ins!

    Hi Prasad, I feel a little overwhelmed..
    Prasad:

    Setup a secondary data connection with sql db and use it to populate. 

    could you explain how I would do this please?? Thanks Dan
    If you can't sleep at night, it's not the coffee it's the bunk!
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.