aspose file tools*
The moose likes JDBC and the fly likes Problem with Access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Problem with Access" Watch "Problem with Access" New topic
Author

Problem with Access

Timothy Marks
Greenhorn

Joined: Sep 08, 2003
Posts: 4
I am having a problem with Access and seem to be able to make no progress. Maybe someone can help.
When I execute the following sql query in Access, it returns (in my DB) 3 rows:
Select Project.* from Customer INNER JOIN Project ON Customer.ID = Project.Cust_ID WHERE ((Cust.Name) Like "*Abc*");
When I try the same query with Java, I get an SQLException. I don't know what it would say in English, but something about 1 parameter expected but too few are given.
When I change the " to ', it executes without an exception, but returns 0 rows.
When I change Like to =, it works fine.
Does anyone have any idea what the problem could be?
[ September 08, 2003: Message edited by: Timothy Marks ]
Timothy Marks
Greenhorn

Joined: Sep 08, 2003
Posts: 4
Solved it. Seems that in Access,

Is legal and returns the expected rows, but if you are accessing the data programmatically, you must

Just another useless inconsistency that makes everything Billy does so darned difficult
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Access