Environment: ArcGIS Engine Runtime 10.1, Visual Studio 2010, Visual C++
Testing of ArcGIS Engine Runtime 10.1 Final has uncovered a difference in the behavior of the IMapControl4::AddLayerFromFile() between the 10.1 Prerelease and 10.1 Final versions when loading a Query Layer whose definition was saved in a *.lyr file.
It is during execution of IMapControl4::AddLayerFromFile() where the change is seen, but it seems the ISqlWorkspace or ILayerFile interfaces may be involved, since the processing is associated with creating and persisting the definition for a Query Layer.
The difference in behavior is the following:
- In ArcGIS 10.0 and ArcGIS 10.1 Prerelease, loading the saved *.lyr file for the Query Layer used the credentials (userid and password) saved in the *.lyr file to establish the connection to the underlying Oracle 11g database. The user was not prompted.
- In ArcGIS 10.1 Final (after rebuilding our application), executing the same code to define the Query Layer and save its definition into a *.lyr file, ArcGIS now displays a prompt for credentials when executing the IMapControl4::AddLayerFromFile()file, as shown in the attached file ArcGIS_10_1_lyr_file_prompt.png.
We have searched the ArcGIS 10.1 ???What???s new???-type online topics but, so far, have not located anything to help explain this change in behavior.
We are trying to understand if:
- This is expected behavior with ArcGIS 10.1 Final and we just have not yet located the documentation that explains the reason for this change(?)
- Or, is this some type of bug (either in the ArcGIS code or something we might be doing wrong in our ArcObjects code)(?)
We would appreciate any insights others might have.
Thanks for your help.
Scott