db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sailorhero" <sailorh...@hotmail.com>
Subject Re: How to do when i want to query like "select * from book where book.name like 'TCP' "?
Date Wed, 30 Jul 2003 16:32:26 GMT
I has used method which is like that you say.
but there is error in compileing this line when i work at eclipse.
code :
   Criteria crit1 = new Criteria();
   crit1.add(BookPeer.TITLE, "TCP", Criteria.LIKE);
   List results = BookPeer.doSelect(crit1);

java.lang.Error: 无法解析的编译问题:
 方法 add(String, Object, SqlEnum)对于类型 Criteria 有歧义

 at com.kazmier.BookStore.main(BookStore.java:76)
Exception in thread "main" 


----- Original Message ----- 
From: "Keeney, Thomas" <KeeneyT@SEC.GOV>
To: "'Apache Torque Users List'" <torque-user@db.apache.org>
Sent: Wednesday, July 30, 2003 12:52 AM
Subject: RE: How to do when i want to query like "select * from book where book.name like
'TCP' "?


> Try something like this,
> 
> Criteria crit = new Criteria();
> crit.add(bookPeer.NAME, 'TCP', Criteria.LIKE);
> List results = bookPeer.doSelect(crit);
> 
> Regards,
> Tom
> 
> -----Original Message-----
> From: sailorhero [mailto:sailorhero@hotmail.com]
> Sent: Tuesday, July 29, 2003 10:23 AM
> To: torque-user@db.apache.org
> Subject: How to do when i want to query like "select * from book where book.
> name like 'TCP' "?
> 
> 
> I used toruqe at Mssql database.
> I want to query something like this SQL :
> 
> select * from book where book.name like 'TCP' 
> 
> but how to use torque to query this?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 
> 
Mime
View raw message