Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27554

[RESOLVED] Oledbcommand where....or....or

$
0
0
Hi all,

I need a quick response to my problem. I need to write an OLEDBCOMMAND that I cannot figure out how to structure. It should look for an access database for a specified value and check two column. If only one or both of the checked columns have specified value, it should select the row. For instance,
COLUMN1............COLUM2....COLUMN3
ROWx.................OK...........NOT OK
ROWx.................OK...........OK
ROWx................ NOT OK.....NOT OK

It should be something like

comm.CommandText = "Select * from table WHERE COLUMN1='" combobox.text & ''," & COLUMN2=OK "' OR '" & COLUMN3=OK & "'"

It should return first and second rowx if combobox value is rowx.
Thanks for your helps.

Viewing all articles
Browse latest Browse all 27554

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>