Results 1 to 3 of 3

Thread: [RESOLVED] Oledbcommand where....or....or

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2013
    Posts
    5

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

    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.
    Last edited by ew03; May 6th, 2013 at 01:59 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width