Insert Infopath repeating section data into database using C# - InfoPath Dev
in

InfoPath Dev

Insert Infopath repeating section data into database using C#

Last post 02-02-2011 09:25 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 02-02-2011 03:27 AM

    Insert Infopath repeating section data into database using C#

    Hi,

    I am new to infopath and trying to insert some data from infopath to sql server 2005 using c-sharpe. After looking into number of posts, i have found some sample code and tried.

    For this, i have created a new Data connection in Form with Receiving Data Option and created a stored procedure with only a insert statement. I am using below sample of code. 

    AdoQueryConnection connection = (AdoQueryConnection)DataConnections["FolderScan"];

    string originalCommand = connection.Command;

    connection.Command = "EXECUTE procFolderScan";

    connection.Execute();

    But above code is not inserting anything in the database. but if i execute my stored procedure from Sql Server management studio with same credentials, it executed the procedure.

    Please suggest me, what is wrong in the above code.

    Thanks.

     

    Filed under:
  • 02-02-2011 09:25 AM In reply to

    Re: Insert Infopath repeating section data into database using C#

    Does your stored procedure require any paramaters? Where does it get the data it is supposed to be inserting into the database?

    Hilary Stoupa

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