jesper

jesper

  • NA
  • 89
  • 54.4k

Why dosent my OR operator dont work..

Sep 24 2013 6:21 AM
Hi

Can any of you tell me why my OR operator dosen't work ? :)

            SqlCommand cmd = new SqlCommand("SELECT userinitials, computerName FROM UserHasComputer WHERE userinitials = @userinitials OR computerName = @computerName", conn);
            cmd.Parameters.AddWithValue("@userinitials", SessionWrapper.userinitials);
            cmd.Parameters.AddWithValue("@computerName", SessionWrapper.computerName);

the code dont care for the computername :)

Answers (3)