Solved

wildcards in executequery

Posted on 1998-04-18
1
299 Views
Last Modified: 2010-04-16
I'm using wildcards in querys, for example:

executeQuery("select * from table artikel where artikelname like '*baseball*'")

I've tested the query directly with a MS-Access-Database and everything works fine. From within java I get no columns
with my resultset. For testing I tried without wildcards

executeQuery("select * from table artikel where artikelname like 'baseball'")

and it works.
0
Comment
Question by:felgen
[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
 

Accepted Solution

by:
sdaxm11 earned 200 total points
ID: 1219050
well, you have to use the % sign not the * sign example

executeQuery("select * from table artikel where artikelname like '%baseball%'")


this is because you are using the JDBC API's and not sending the SQL command directly to MS Access.  you are using JBDC-ODBC which translate it to Access command.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

735 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