Hello...
I'm trying to work with a stored procedure (from SQl 2005) in my Infopath 2007.
I found this Microsoft article: http://msdn.microsoft.com/en-us/kb/kb00827007.aspx but I have problems with this simple code:
XDocument.QueryAdapter.Command = "execute mysp 'This is a test' ";
XDocument.Query();
First I received that the XDocument doesnt exits in the actual context.
After search in Google I found as solution to add the reference: Microsoft.Office.Interop.InfoPath.SemiTrust.
using Microsoft.Office.InfoPath;
using Microsoft.Office.Interop.InfoPath.SemiTrust; <<< NEW LINE
using System;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using mshtml;
But when added this dll I get another error. InfoPath is not getting XDocument.QueryAdapter as a Static object and it needs a reference. Also that XDocument.QueryAdapter doen't have a definition for 'Command'.
Can someone help me what it's going on with the Microsoft example? Or maybe if you can tell me another page with a parameterized stored procedures and InfoPath 2007.
Thanks a lot of.