Submit Data to Multiple Data sources

P

PRB

Hi,

I am using custom code to submit data to a SQL 2005 Db in an Infopath form
and it works fine, but I need it to submit data also to the Share Point
Library and save the form in the SharePoint library. ( all in one
go).Currently I have a Submit and a Save button( for saving to Sharepoint) in
the Infopath form on the Sharepoint server.

Thanks
 
K

Kalyan G Reddy MVP (GGK Tech)

Hello

You can set Rules on the Submit button to submit the form to Sharepoint
Library and save the form to the Library along with your coding running to
save the data to SQL DB
 
P

PRB

Hi Kalyan,

Thanks for the quick reply, but when I select the option for Submitting
through Roles, the option for submitting through Code is disabled. And I need
the code to submit to the Database(SQL 2005) as there are some manipulations
required to be done while submitting. PLease let me know If I am missing
someting.

Thanks
 
K

Kalyan G Reddy MVP (GGK Tech)

Hello

You use the Action as Rules and Custom Code
For Submit to SQL use Custom code (Edit Form Code) and for saving or
submitting to sharepoint Click on Rules and Add Action -> Submit using a
Dataconnection -> Add -> To a Sharepoint Library....
Any Number of rules can be set on the Button.

I hope I made it clear
 
P

PRB

Hi,

Again Thanks for the quick reply, but we do not have a submit button on the
form, we are using the Submit form option and with that we do not get the
option to do both. Hope I am not confusing.
 
K

Kalyan G Reddy MVP (GGK Tech)

Hello
Aah Now I understand. In this case you should write the code to submit to
sharepoint also as you did for submitting to SQL, or else Submit button is a
best option which allows you to do both.
 
P

PRB

Hi,

Thanks for the solution specified but can you specify where can I find a
sample/example to implement this or have you implemented this type of code?
Also in the Custom button I believe you cannot do validation for the fields
before submittin the form.

In Early anticipation

Thanks
 
P

PRB

Hi,

Thanks again for the reply, Where can I add the JScript code since our
programming language is VB/C# and the form is web enabled. Am I missing
something?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top