Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Missing column

 
Ranch Hand
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 :
 
Bartender
Posts: 4107
72
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 445
Android Eclipse IDE Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies..It works now!!!
 
    Bookmark Topic Watch Topic
  • New Topic