Solved

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

Posted on 2011-03-18
2
271 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

770 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