Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Plz check the syntax: Whats wrong

 
Gorakshanath Pandey
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
selopen=" select count(*) from country "
+ "where region =" + "'" + temprs.getString("region") + "'"
+" and W_cmr = 'L' and closed_dt between " + "'"
+ dtrs.getDate("stdate") + "'" +" and "
+"'" + dtrs.getDate("eddate") + "'";
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you getting a compile error? An SQL error? A JDBC error? no results back on the query? Please post the error you are receiving, and where/when it occurs.
Also, what database are you using? You have to be careful about how you specify dates on most databases: yours might not like a date to be specified as a quote-delimited string unless it's in a very specific format.
[ March 08, 2004: Message edited by: Wayne L Johnson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic