Hi all,
 
Basically, this is the query i'm trying to do: (i'm using SQL SERVER 7.0)
 
SELECT * FROM people 
        WHERE people.name LIKE '%john%'
 
This is what i've done now:
    - In the people home interface
 
        String findByName_query  = "people.name like $1";
        .
        .
        public java.util.Enumeration findByName(String value) throws   java.rmi.RemoteException, javax.ejb.FinderException;

 
I make a call to the finder query like this:
 
Enumeration en = PeopleHome.findByName("%John%");
 
But this doesn't work or at least I don't get any result(of course it should return a result).
If I replace the "like" clause by "=" and i make a call like
          Enumeration en = PeopleHome.findByName("John");
it does work, I get a result.
 
Does anybody know what I'm doing wrong? is there any problem with the "like" clause?
 
Thanks in advance
 
P.S. I'm not trying to laugh at anybody :-)
 
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED]]On Behalf Of Geoff Marshall
>Sent: Monday, February 12, 2001 10:31 AM
>To: Orion-Interest
>Subject: Re: Problems with a finder method in a cmp
>
>
>Please don't laugh at me, but what IS a 'finder method in a CMP'??  Just a
>simple explanation or a pointer to more info, please...
>--
>
>-Geoff Marshall, Director of Development

Reply via email to