question

Anne-0140 avatar image
0 Votes"
Anne-0140 asked XingyuZhao-MSFT commented

If statement compare a string, not work well

I am debugging a vb.net script in a SSIS script component.
The purpose is to find who still login to the system and email them at maintenance time.

In the script component is vb.net script:

If there is a user logged in the database and then I will populate a emailToList variable.
But I enabled the debug, when it goes to the step if ... then it directly goes to end if when I step into.
and when I hover over the if statement I see it returns false. See attached screenshot. 136419-capture.png But I see the dbname="Versatrans" and loginname = "versatransuser", why it returns false instead of true?

Thanks,


dotnet-standard
capture.png (29.5 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Anne-0140 ,
When setting the break point on line 47, what's the values of 'dbname' and 'loginname' ?

0 Votes 0 ·

1 Answer

Anne-0140 avatar image
0 Votes"
Anne-0140 answered XingyuZhao-MSFT commented

Never mind, find out. The word in quotation mark is case sensitive. That is strange, I thought vb. Net is case insensitive.
Thanks

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Anne-0140 ,
I'm glad to hear that your problem has been solved, and you can consider clicking "Accept Answer" and upvoting your reply. It will help others with similar questions find the solution quickly.

0 Votes 0 ·