This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes How can I search from different field type ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How can I search from different field type ?" Watch "How can I search from different field type ?" New topic
Author

How can I search from different field type ?

Narue Klo
Greenhorn

Joined: Apr 03, 2009
Posts: 10


ref is String
receiveno is integer

I would to search from table Receive by searching from ref and receive
I got an error



How can I search from different field type ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

"Bomber Man", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

If receiveno is an integer, why are you feeding it a string?
Narue Klo
Greenhorn

Joined: Apr 03, 2009
Posts: 10
Already changed a display name, thanks

I would like to search in condition on both of these two field
How can I do that ?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

What if you do the cast yourself first? Then pass it to the object array in the find method call.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I search from different field type ?
 
Similar Threads
EJB 2.0, WSAD 5, example problem
Lock and Search
heartbeat messages help
A question about casting from Object[]
Log4J & SMTPAppender