How to display a oracle table from a java program?

How to display a oracle table from a java program.Hello friends, I have written a Java program, using oracle 10g as backend.I want to display a oracle table as output. Im not getting how to display oracle table as a output table.. Pls help meThank you
[279 byte] By [jayanthdsa] at [2007-10-3 10:23:14]
# 1
You need to search google for oracle db connector for java, then get the connection after that everything is same.
AmitavaDeya at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 2
if you already have an oracle Driver for java, and already stored data in your oracle database, and lastly is able to interact with your oracle through java.then, all you need to do is to query you table and return it as JTable.=)
Redxxiva at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 3

> if you already have an oracle Driver for java, and

> already stored data in your oracle database, and

> lastly is able to interact with your oracle through

> java.

>

> then, all you need to do is to query you table and

> return it as JTable.

> =)

yep. it really is that simple, after all

georgemca at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 4

where you want disply o/p on jsp or console.

learn the JDBC first

http://marakana.com/article_jdbc_example.html

Class.forName("ur oracle driver");

Connection con = DriverManager.getConnection("jdbc url" , "user ",pass");

Statement stmt = con.createStatement();

ResultSet rs = stmt.executeQuery("select * from table");

ResultSetMetaData rsmd = rs.getMetaData();

// rsmd obj u can get col name & all cols count.

// here you display ur data

narayanab16a at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 5

jayanthds, you're not going to get a satisfactory answer to this here. it's too big a task to just be quickly outlined in a forum - the reply "all you need to do is to query you table and return it as JTable" is worthless, for example, since the solution to any problem can be distilled to such a soundbite, if need be. doesn't make the solution any simpler

essentially you're asking "how do I write a database application?". all you'll get is snippets of code that, when fitted together, will eventually help you do this, but you'll spend days and days coming back saying "right, I've done that, now what?" until either you or the forum gets frustrated with the whole affair and the process stops

there are entire books written about this subject, and countless tutorials and guides on the internet. you're better off going down that route

georgemca at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 6

> jayanthds, you're not going to get a satisfactory

> answer to this here. it's too big a task to just be

> quickly outlined in a forum - the reply "all you need

> to do is to query you table and return it as JTable"

> is worthless, for example, since the solution to

> any problem can be distilled to such a

> soundbite, if need be. doesn't make the solution any

> simpler

>

> essentially you're asking "how do I write a database

> application?". all you'll get is snippets of code

> that, when fitted together, will eventually help you

> do this, but you'll spend days and days coming back

> saying "right, I've done that, now what?" until

> either you or the forum gets frustrated with the

> whole affair and the process stops

>

> there are entire books written about this subject,

> and countless tutorials and guides on the internet.

> you're better off going down that route

hehehe.

Redxxiva at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 7

> > jayanthds, you're not going to get a satisfactory

> > answer to this here. it's too big a task to just

> be

> > quickly outlined in a forum - the reply "all you

> need

> > to do is to query you table and return it as

> JTable"

> > is worthless, for example, since the solution to

> > any problem can be distilled to such a

> > soundbite, if need be. doesn't make the solution

> any

> > simpler

> >

> > essentially you're asking "how do I write a

> database

> > application?". all you'll get is snippets of code

> > that, when fitted together, will eventually help

> you

> > do this, but you'll spend days and days coming

> back

> > saying "right, I've done that, now what?" until

> > either you or the forum gets frustrated with the

> > whole affair and the process stops

> >

> > there are entire books written about this subject,

> > and countless tutorials and guides on the

> internet.

> > you're better off going down that route

>

> hehehe.

well, it's true! I used to have a manager that would outline the solution to a problem in a few lines of pseudocode, and then firmly believe that the actual solution would be just as brief and simple. shame his pseudocode included such lofty abstractions as "reformat all data"

georgemca at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...
# 8
if you put it that way, i see to be very true. =)
Redxxiva at 2007-7-15 5:44:56 > top of Java-index,Java Essentials,Java Programming...