aspose file tools*
The moose likes JDBC and the fly likes JDBC SQL QUERY PROBLEM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC SQL QUERY PROBLEM" Watch "JDBC SQL QUERY PROBLEM" New topic
Author

JDBC SQL QUERY PROBLEM

Tania Sen
Greenhorn

Joined: Feb 28, 2010
Posts: 8
I am making a student database
My database has columns as:
roll name stream year jan feb march april .... dec

now i take user input in a jsp page and pass to servlet ..I take month ,attendance, and roll as input..
my sql query in the servlet is


its not working ..it only works if i give the months name

..but the month is supplied by the user !!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

guitar maniac wrote:

Please check your private messages for an important administrative matter.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39435
    
  28
And please avoid writing all in CAPITAL letters.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2503
    
    8

update attendance set ? =? where roll=?

Hi, you can't bind a column name. The first question mark is invalid.

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC SQL QUERY PROBLEM