If statement compare a string, not work well

Anne 281 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,

Developer technologies .NET Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anne 281 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


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.