This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Statement parameter 1 not set. is coming

 
rakesh kopperapu
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
String path = "%"+product_part_selected+"%";
try {
if(searchby.equalsIgnoreCase("code")){
System.out.println("in code");
result=getPersistenceEngine().retrieve(Criteria.PRODUCT_CODE_PART_SELECTED, new Object[] { path });
}else if(searchby.equalsIgnoreCase("category")){
System.out.println("in category");
result = getPersistenceEngine().retrieve(Criteria.PRODUCT_CATEGORY_PART_SELECTED, new Object[] { path });
}else if(searchby.equalsIgnoreCase("brand")){
System.out.println("in brand"+path);
result = getPersistenceEngine().retrieve(Criteria.PRODUCT_BRAND_PART_SELECTED, new Object[] { path });
}
} catch (Exception e) {
e.printStackTrace();
}

---------------------------------------------------------
here path is a string,i am passing path as a parameter to query
in if block query is working ,in this query for code i am passing parameter[code is a string and parametr is also a string]
but in else block for category i am passing parameter[category is bigint and parameter is again string]
so how can we pass String to bigint
so my problem will solve if i convert String into bigint[i am using mySql]
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

so my problem will solve if i convert String into bigint

Take a look at the API for BigInteger which has a constructor

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic