?
Solved

SQL Access Query from ado.net

Posted on 2012-04-02
1
Medium Priority
?
391 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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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 …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

765 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