Solved

is IF ...........OR ............. THEN valid

Posted on 2011-03-18
2
284 Views
Last Modified: 2012-08-14

In VB is ther following IF statement valid?

If row(1).ToString() <> "int" Or row(1).ToString() <> "tinyint" Or row(1).ToString() <> "bit" Then
0
Comment
Question by:Mr_Shaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 35166236
it is valid, but I would rather presume you want to put AND instead of OR...
otherwise, it will alway return TRUE.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 35166305
Using ANDALSO is considered better practice as it will not evaluate all the condition once it matches with one, thereby improving performance.
So if the 1st condition is met, the other 2 conditions are not evaluated
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question