File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and Relational Databases 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 10733
    
    9

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: 43381
    
  32
And please avoid writing all in CAPITAL letters.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2541
    
  10

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
 
jQuery in Action, 3rd edition
 
subject: JDBC SQL QUERY PROBLEM
 
It's not a secret anymore!