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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Missing column" Watch "Missing column" New topic
Author

Missing column

Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Hi friends,
I am using JSP and AJAX to display reports in my Web Application.... I had 17 fields in my table..The problem is one field has all the 17 columns and other one has not, it contains some null values too...When i try to display the record which has some NULL fields,instead of displaying as NULL as output, the column just wont appeared, ie.. just a blank white space there...Whats the problem.
Below content was edited :


Never try to be a hard-worker. Be a smart-worker.
My Blog
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3825

If you have created the fields to have null values and if you don't insert anything in the previous insert statements you won't get anything most probably. Have you tried this sql directly against the database to see what it outputs? Any way to have database access code in JSP seems very bad design.
[ November 12, 2008: Message edited by: Vijitha Kumara ]

SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Satish Chilukuri
Ranch Hand

Joined: Jun 23, 2005
Posts: 266
Also, you are constructing an sql query using string concatenation. It can lead to SQL injection attacks. Always use PreparedStatement for executing sql queries.
Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Thanks for your replies..It works now!!!
 
wood burning stoves
 
subject: Missing column