wood burning stoves 2.0
The moose likes JDBC and Relational Databases and the fly likes regarding preparedstatement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Reply locked New topic

regarding preparedstatement

yekkala krishna
Ranch Hand

Joined: Mar 04, 2007
Posts: 105
hi guys,

Shall we excuete select query with help of preparedstatement interface.

For example : select * from emp;

with regards
Y.rama krishna
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

I don't think that you need to use a PreparedStatement in this case. PreparedStatement objects are for when you repeatedly execute the same kind of query over-and-over again with different parameters.

In this case, I think that a regular Statement will serve you best.

Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3381

Hello yekkala krishna,

Please dont make duplicate posts. Your post is already answered here

Please continue it from there.
[ July 11, 2007: Message edited by: Raghavan Muthu ]

Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
I agree. Here's the link: http://aspose.com/file-tools
subject: regarding preparedstatement
It's not a secret anymore!