This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Missing column" Watch "Missing column" New topic

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

Joined: Mar 24, 2008
Posts: 3817

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 ]

[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!!!
I agree. Here's the link:
subject: Missing column
Similar Threads
JSF datagrid component
getting column names from JDBC and display it in JTree
NX: [UrlyBird 1.3.1] how flexible with the data format should we be?
JDBC Frustration
Javascript in Struts