Hi
I have a datasource that get's it's data from an xml-file. I now have two xml-files with the same structure but with differerent data. The customer wants to be able to switch between the two xml-files by clicking a button. The reason for this is that one file contains old data and the other new data so they would like to switch between them. They don't want two datasources so in the code for the button I simly use this
FileQueryConnection fc= (FileQueryConnection)this.DataSources["MyConnection"].QueryConnection
fc.FileLocation = _filePath + @"\" + fileName;
fc.Execute();
It works with no problems switching data source but each time I do it the working memory Infopath uses increases and it doesn't release it after the connection has been queried.
The xml-files are about the 10 mb each and the memory infopath uses increases by 20-30Mb each time I switch data using the button. Is there any way I can release this memory properly?
Best regards,
Niclas