• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

VB Data Results

CMDString = "select DisplayName from vwSSO where SiteLocation = '" & HSite.Value Or Hall.Value & "'"

When I run my app. the fields are empty. Should I be closing my statement any different?
0
devweez
Asked:
devweez
  • 2
2 Solutions
 
JMT116Commented:
I think your cmd string should look like
CMDString = "select DisplayName from vwSSO where SiteLocation = '" & HSite.Value & "'  Or SiteLocation = '" & Hall.Value & "'"
0
 
Éric MoreauSenior .Net ConsultantCommented:
or it can be:

CMDString = "select DisplayName from vwSSO where SiteLocation in ('" & HSite.Value & "', '" & Hall.Value & "')"
0
 
JMT116Commented:
You use of in would achieve the same thing as using multiple or statements, but has the advantage of being more concise.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now