This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Statement parameter 1 not set. is coming Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Statement parameter 1 not set. is coming" Watch "Statement parameter 1 not set. is coming" New topic

Statement parameter 1 not set. is coming

rakesh kopperapu

Joined: Oct 17, 2008
Posts: 8
String path = "%"+product_part_selected+"%";
try {
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) {

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

Joined: Mar 24, 2008
Posts: 3899

so my problem will solve if i convert String into bigint

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

[How to ask questions] [Twitter]
Have you checked out Aspose?
subject: Statement parameter 1 not set. is coming
It's not a secret anymore!