This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring 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