I have to first load a vector layer (in .shp format) in arcmap and then it should select to specific attribute (the name of attribute is taken as input from user which i have done). and only selected attribute layer should be visible.
All this should be done using python.
So how can I do this? I have done this code snippet
import arcgisscripting
import arcpy
gp = arcgisscripting.create(9.3)
gp.workspace = "E:\boundary"
sFile = "E:\boundary\sample.shp"
lyr = "layer"
gp.makefeatureLayer_management(sFile, lyr)
gp.toolbox = "management"
gp.SelectLayerByAttribute_management("layer", "NEW_SELECTION", " 'DNAME' = 'NAME' ")
#now zoom to selected feature
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]
df.zoomToSelectedFeatures()
arcpy.RefreshActiveView()
but it is throwing an error Runtime error Traceback (most recent call last): File "", line 7, in ExecuteError: ERROR 000732: Input Features: Dataset E:oundary\sample.shp does not exist or is not supported.