Recognition of different SQL Management versions
Posted: Tue Aug 16, 2011 8:58 am
I am struggling to have 1 set script running for identifying, recognising or selecting items in the tree in the different versions of SQL Management Studio.
Eg:
The Object Explorer of SQL Server2008R2 is mapped as : container[@caption='Object Explorer']/container[@caption='']/tree/tree/treeitem/treeitem[@accessiblename='Security'] level and
SQL Server 2008 is mapped as: container[@caption='Object Explorer']/container[@caption='']/container/tree/tree/treeitem/treeitem[@accessiblename='Security'] and extra level = container. The 2 versions are thus not mapped the same.
How do I get around this without so many "continue fail" actions because when I have to validate if a certain Login user has been created the one fails and the one passes due to this problem which results in my script showing a Fail
Eg:
The Object Explorer of SQL Server2008R2 is mapped as : container[@caption='Object Explorer']/container[@caption='']/tree/tree/treeitem/treeitem[@accessiblename='Security'] level and
SQL Server 2008 is mapped as: container[@caption='Object Explorer']/container[@caption='']/container/tree/tree/treeitem/treeitem[@accessiblename='Security'] and extra level = container. The 2 versions are thus not mapped the same.
How do I get around this without so many "continue fail" actions because when I have to validate if a certain Login user has been created the one fails and the one passes due to this problem which results in my script showing a Fail