If statement compare a string, not work well

Anne 276 Reputation points
2021-09-29T21:46:31.877+00:00

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,

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,417 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Anne 276 Reputation points
    2021-09-30T03:19:12.593+00:00

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