troubleshooting Question

Basic SQL query statement not working when WHERE clause added

Avatar of SweetingA
SweetingA asked on
.NET ProgrammingVB ScriptVisual Basic.NET
11 Comments2 Solutions275 ViewsLast Modified:
Very basic SQL clause will not return a value either in vb or SQL even though the table definately has the data included.  Machine is selected in a combobox and the selectedindexchange event is used.

I can run it without the where clause and it works fine and I10 is definately a machine listed.  Machine is a varchar(15), don't know if that should make any difference in the statement.

In SQL
SELECT OEE As OEE, Hour As Hour FROM qry_OEE_Hourly_Machine WHERE Machine ='I10'

In VB
SQL.RunQuery("SELECT OEE As OEE, Hour As Hour FROM qry_OEE_Hourly_Machine WHERE Machine ='" & cboMachine.Text & "' ")
ASKER CERTIFIED SOLUTION
fundacionrts
Administrador de Sistemas

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros