How do you open Infopath form saved in SQL Database with code

C

Chrisf

I am saving Infopath forms in an xml column in a SQL table. In my form I am
using a web service to get the list of names for the forms from the SQL table
(the id is autoincredmented) and listing them in a repeating table with 2
columns, one with the name assigned to the form and another column with a
button labeled "Open". In the clicked event for the Open button how do I go
about opening the corresponding form in Infopath?
 
S

Shiva (GGK Tech)

Hello,

In Open button onClick event, you have to write the code to open the form,

thisApplication.XDocuments.Open(<Form Url>, Type.Missing);
 
S

Shiva (GGK Tech)

Hello,

In Open button onClick event, you have to write the code to open the form,

thisApplication.XDocuments.Open(<Form Url>, Type.Missing);
 
C

Chrisf

I'm getting an error that Microsoft.Office.Infopath.Application does not
contain a definition for xdocuments. I've included the following:
using Microsoft.Office.InfoPath;
using System;
using System.Xml;
using System.Xml.XPath;
using System.IO;
using System.Text;

What am I missing?
 

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