• Set BreakPoints in your C# Script Editor, and verify the values in your variables. Step thru the code this way to troubleshoot issues like this. You can hover the mouse pointer over the variable and it will show you what the value is.

    Andrew SQLDBA