I am using SQL Management Objects (SMO) in a C# project to run some DDL scripts. It is the first time I've used SMO.
It appears to work fine, but I can't seem to find a list of possible values returned by the SMO ExecuteNonQuery method.
In my testing, when my DDL script runs, apparently successfully, I get a return value of -13. In most examples I've seen (almost all copied from MSDN), they don't even bother to check the integer return.
Does anyone know of documentation about or a list of the return values from SMO ExecuteNonQuery? -13 seems a little odd, so I'm assuming there are other possible return values.
Or do you just assume unconditional success unless an exception is thrown?