I created a template that retrieves data via a web service. It works OK in
design mode when I preview the form for the first time. Then if I preview
the form again, Infopath crashes and closes just when it tries to access the
web service using the following code:
thisXDocument.DataObjects["GetData"].Query();
where GetData is the name of the data connection that uses a web service.
The same thing happens if I check out the box "Automatically retrieves data
when the form is opened".
I publish the template, made it fully trusted. And the same thing happens
when I create a new form with the Infopath template.
Any idea? I have spent so much time researching this problem and I'm running
out of time.
I'm using Infopath SP1 and VS 2003 with C#.
Thanks in advance for your help,
Yann
iT SOUNDS LIKE YOUR VIEW IS LOOKING FOR A DATAOBJECTS THAT NO LONGER EXISTS..
DELETE THE CODE FROM THE XSL (THE VIEW) AND JUST ADD IT AGAIN IN INFOPATH,
BUT BE CAREFUL TO LEAVE THE XSL CODE WITH MATCHING TAGS.
> I created a template that retrieves data via a web service. It works OK in
> design mode when I preview the form for the first time. Then if I preview
[quoted text clipped - 19 lines]
>
> Yann
Yann Gibaja - 22 Sep 2004 04:14 GMT
I'm not sure what you mean by deleting the code from the XSL. Which line of
code?
The only way I can make this work is by modifying the dataconnection but not
change anything as if it would help refresh or reset it, and then the
Preview Form works again until I save the template. The next time I preview
the form, the query to the dataobject makes the preview form close
immediately.
Something weird is that I end up with several schemas in the project:
getdata2.xsd, getdata3.xsd
What's going on here?
Yann
> iT SOUNDS LIKE YOUR VIEW IS LOOKING FOR A DATAOBJECTS THAT NO LONGER
> EXISTS..
[quoted text clipped - 28 lines]
>>
>> Yann