• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Statement parameter 1 not set. is coming

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic