jesper

jesper

  • 1.9k
  • 89
  • 44.9k

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)