code hangs during changing a DataSource update for map layer from MXD file

Discussion created by hawei on Jan 19, 2011
Latest reply on Feb 3, 2011 by hawei
Hi all,
I have some map layers stored in SDE / Oracle database, accessed via DirectConnect. The user saves the layers in an MXD file. To update the DataSource (e.g. when the SDE_USER password has changed), I use some code as described the forum thread "Change a layers data source in a mxd" (http://forums.esri.com/Thread.asp?c=93&f=993&t=189210#943440), which worked for me.

Now a user has problems with an MXD file, where the code hangs in the while-loop after the if (pFeatureLayer.DataSourceType == "SDE Feature Class") line. I have been waiting for about 10 minutes:
- no exception,
- nothing unusual in the sdedc_Oracle.log file
- the mxd file size is just 26 kB,
- the MXDDoctor (from c:\Programme\ArcGIS\DeveloperKit\Tools\MXDDoctor.exe) reports as diagnosis "No corrupt objects found."
- the MXDEditor (http://resources.esri.com/help/9.3/ArcGISEngine/java/doc/5a6ae887-c141-4616-bab3-167ccc5c0ed3.htm) did not help yet, because I could not start it, despite new Java and ArcGIS java installation.

We use ArcGIS Engine 9.3 and Windows XP.

Do you have any ideas how to analyse (or even repair) the mxd file?