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 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 Android Security Essentials Live Lessons this week in the Android 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: 10170
    
    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: 38031
    
  22
And please avoid writing all in CAPITAL letters.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JDBC SQL QUERY PROBLEM
 
Similar Threads
How to update a database using web forms
Database update
SQL Error
handling quotes in sql queries
set values in a table from other