Solved

SQL Access Query from ado.net

Posted on 2012-04-02
1
388 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 500 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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

737 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