Solved

wildcards in executequery

Posted on 1998-04-18
1
294 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now