aspose file tools*
The moose likes JDBC and the fly likes How to get all the columns from a Table with its value . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to get all the columns from a Table with its value ." Watch "How to get all the columns from a Table with its value ." New topic
Author

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

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

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 .



Save India From Corruption - Anna Hazare.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

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.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874

Ravi,

Use getColumnName to get column name and value as as usual using getters.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thank you very much Balu.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

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

Joined: Apr 18, 2009
Posts: 2234

Anybody please help .
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get all the columns from a Table with its value .
 
Similar Threads
write userdefined method into HttpServlet.
Displaying image from database
how to write user defined method into doPost method in httpservlet
Delete Records from MS Access Database
headache can someone help me in this