Solved

SQL Access Query from ado.net

Posted on 2012-04-02
1
372 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
1 Comment
 
LVL 18

Accepted Solution

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

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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