|
-
October 1st, 2000, 12:37 PM
#1
odbc select ..like ?
Hi, , I spent long time but it does not work :
PreparedStatement getSearchStmt;
String getchilds = "select * from MP5_CONCEPT_DEPENDENCIES where PARENT_ID=?";
getSearchStmt.setString(1,"'% + searchstring + %'");
But it does not return nothing, I don't know if what I am doing is correct or not.
Thanks
-
October 2nd, 2000, 08:44 AM
#2
Re: odbc select ..like ?
May be you should write your select statement like:
"SELECT * from EMPLOYEE WHERE FIRST_NAME LIKE 'A%'
This worked under MS SQL, ORACLE and Sybase.
-
October 3rd, 2000, 02:09 PM
#3
Re: odbc select ..like ?
The following should work:
String getchilds = "select * from MP5_CONCEPT_DEPENDENCIES where PARENT_ID LIKE ?";
getSearchStmt.setString(1, "'%" + searchstring + "%'");
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|