Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Access Query from ado.net

Posted on 2012-04-02
1
Medium Priority
?
396 Views
Last Modified: 2012-08-14
Greetings,

My SQL query does not return any results.  I am using ADO.NET from VB.Net 2008.  
There are three variables:

BankID,   Word1, and    Word2

The query is:

Sql = "Select QID from Keywords WHERE ((BankID = " &  BankID & ") And  (Keyword Like '" & Word1 & "?' ))  & " and QID  IN " &
(Select QID from Keywords WHERE ((BankID = " & BankID & ") And  (Keyword Like '" & Word2 & "?' )))"



I have used both a  ? and an * for the wildcards.    I do not get an error, but the dataset is empty.


Thanks for any help

VW
0
Comment
Question by:VWhitehead
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
lludden earned 2000 total points
ID: 37797961
wildard in SQL is %
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Suggested Courses

610 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