3
Answers

Why dosent my OR operator dont work..

jesper

jesper

11y
1.1k
1
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)