Solved

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

Posted on 2011-03-18
2
253 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
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
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
Comment Utility
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now