I found the code that works to change the layers in my mxd from one SDE workspace to the other SDE worksspace. The script runs, but does not change the tables to the new SDE workspace. I replaced lyr with Table, but can't seem to get it to work. Once I get the table data source script to update I will put it into code that loops through MXD files in a specified folder and updates any GDSERVER data connections to point to GDTEST using the assigned connection properties. I am new to this and could use some help please :)
The error msg I get is. Traceback (most recent call last): File "C:\Users\ferencek\Desktop\TEST1.py", line 4, in for Table in arcpy.mapping.ListTables(mxd): AttributeError: 'module' object has no attribute 'ListTables'
import arcpy;
mxd = arcpy.mapping.MapDocument(r"N:\\5-Processes\\Resources\\DynamicData\\SourceMXD\\Copies for GDTEST\\Test\\Data_CCTV.mxd");
for Table in arcpy.mapping.ListTables(mxd):
if Table.supports("DATASOURCE"):Table.replaceDataSource("C:\\Users\\ferencek\\AppData\\Roaming\\ESRI\\Desktop10.2\\ArcCatalog\\sde_appreader (SDE_LIVE) on GDTEST.sde", "SDE_WORKSPACE", Table.datasetName, False)
mxd.saveACopy(r"N:\\5-Processes\\Resources\\DynamicData\\SourceMXD\\Copies for GDTEST\\Test\\CopyData_CCTV.mxd");
del mxd