Insert Stored Procedure With Select - No records in select - InfoPath Dev
in

InfoPath Dev

Insert Stored Procedure With Select - No records in select

Last post 05-28-2015 08:37 AM by Omkara. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 05-28-2015 08:37 AM

    • Omkara
    • Not Ranked
    • Joined on 05-28-2015
    • Posts 1

    Insert Stored Procedure With Select - No records in select

    Hello

     I am using  stored procedure which does insert followed by a select statement.

    I had really hard time to get the infopath form to use the stored procedure  after countless hours of searching online and following things i was able to get the stored procedure to be called.

    Strange thing is it does the insert but i do not see the result set of select query, the same stored procedure works fine in SSMS

     I have Set IMPLICIT_TRANSACTIONS OFF in stored proc

    Below is the code for stored procedure

    IF NOT EXISTS(SELECT TOP 1 Id from testtable where Id= @ID)
        BEGIN
            --INSERT HERE
            INSERT INTO    [dbo].testtable(Id)
                                VALUES    (@ID)
            COMMIT
            Select Id from [dbo].testtable  where Id = @ID


    In Infopath form i use the below code and i get null

    XPathNavigator myNavigator =
                      this.DataSources["testtable"].CreateNavigator().SelectSingleNode("//dfs:myFields/dfs:dataFields", this.NamespaceManager) 

    I really appreciate a quick response.

    Thanks in advance

     

     

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