Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

wildcards in executequery

Posted on 1998-04-18
1
Medium Priority
?
303 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 600 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

721 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