This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Plz check the syntax: Whats wrong Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Plz check the syntax: Whats wrong" Watch "Plz check the syntax: Whats wrong" New topic
Author

Plz check the syntax: Whats wrong

Gorakshanath Pandey
Greenhorn

Joined: Feb 25, 2004
Posts: 11
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

Joined: Sep 03, 2003
Posts: 399
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Plz check the syntax: Whats wrong
 
Similar Threads
Looking for Entry Level java jobs
How much is taking SCJD written exam?
Why South Indian can’t live without Curd Rice?
futurama
I have no sympathy for the Iraqis