Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get all the columns from a Table with its value .

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I have a requirement of getting all the columns from a Table with its value .

Please tell me what i am doing wrong here .

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on JSP. For more information, please read this.

This post has been moved to a more appropriate forum.
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,

Use getColumnName to get column name and value as as usual using getters.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Balu.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
This code worked for me . With this i am able to retrive all the column names from a Table.
Now i struck up with a diffferent issue here . Please help me .




Now how can i retrive all the Values of the type text within a script ?? Means upon pressing a submit button i am calling a function under script in which i need to retrive all of those .

Please help me . I am sorry for my English and may be posted in a wrong forum also .


 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,
You can write out a JavaScript array containing those values that the script can access. The script can't call JDBC because that happens on the server and the script is run at client time.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jaenne ,

Can you please tell me how to do this ? Or please point to a link as such a requirement.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anybody please help .
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi,
First of all, please be patient and wait at least 24 hours for a reply. People are in time zones and go online at different times around the world.

Second, what have you tried so far. Which of the following do you know how to do?
1) Write a JavaScript array with hard coded values
2) Write the data returned by JDBC as comma separated list.
3) Merge these two.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic