3
Contributors
3
Replies
5
Views
4 Years
Discussion Span
Last Post by radhakrishna.p
0

In my page iam getting all column names of a particular table with checkboxes. when iam select one or more checkboxes i have to get data of that selected columns only. what is the jsp code for this.

0

move the selected column names and table to another page where you want to display the details and there you have to format these two things as the actual sql-query

for example :

anotherPage.jsp

<%
String tab_name = request.getParameter("table_name");
String col_name1 = request.getParameter("column_name1");
String col_name2 = request.getParameter("column_name2");
.
.
.
.

// and make query_string as follows

String sql_query = "Select "+col_name1+","+col_name2+" from "+tab_name;

// then create connection object ,retrive details 
%>

then the remaing code is as it is

Edited by pritaeas: Added code tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.