I'm building a C# application that lets the user change their DataSources of all the layers in their MXD. I have it working on FeatureLayers and LYR files but I'm stuck on how to change Raster layers from one sde database to another sde database. Below is all I have so far with Rasters. To change FeatureLayers I used IMapAdmin2 but theure is no option to change Rasters with that interface. Any ideas or additional code? Many thanks
UID uid_ras = new UIDClass();
uid_ras.Value = "{D02371C7-35F7-11D2-B1F2-00C04F8EDEFF}"; //IRasterLayer
IEnumLayer raslayers = pMap.get_Layers(uid_ras, true);
raslayers.Reset();
pRas = raslayers.Next() as IRasterLayer; //get the first layer
while(pRas != null) //Now change each Raster's DataSource to the new Datasource
{
//I'm unsure what to do from here..
}