i have a winform app which host of infopath forms. form templates and data stores in database and when user want to open/edit an existing infopath form data, it must be extract from database, save on disk and then open it to display it in formControl.
my problem is that when i open form data, after it has been extracted on disk, i got this error :
InfoPath cannot open the following file: C:\Users\Hamed\Documents\Visual Studio 2008\Projects\InfopathFormTest2\InfopathFormTest2\bin\Debug\d00d73e8-cf5c-4b12-b9a6-591c4ade83aa.xml.
The file cannot be opened because it is not a valid InfoPath form.
The processing instruction in the file is missing or invalid.
here is my code :
this._fullPath = System.IO.Path.Combine(Application.StartupPath, this._dataRow.FormID.ToString() + ".xml");
this._templatePath = System.IO.Path.Combine(Application.StartupPath, this._templateRow.TemplateID.ToString() + ".xsn");if (HelperClass.ExtractToDisc(_fullPath, ASCIIEncoding.Unicode.GetBytes(this._dataRow.FormContent)))
this.txtFormName.Text = this._dataRow.FormName;
where is my problem and how to solve this ?
thanks in advancehttp://www.codeproject.com/KB/codegen/DatabaseHelper.aspx
View Complete Post