aspose file tools
The moose likes JDBC and the fly likes prepared or general statement in JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "prepared or general statement in JDBC" Watch "prepared or general statement in JDBC" New topic
Author

prepared or general statement in JDBC

Rajaram csse
Greenhorn

Joined: Apr 18, 2005
Posts: 1
which one is heavier prepared / Statement
what about the maximum number of queries that could be run per connection in JDBC.


Raja ram
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1076

Did you try searching on web this first hit on web

both have different purpose and this is written on asktom

The use of a Statement in JDBC should be 100% localized to being used for DDL (ALTER, CREATE, GRANT, etc) as these are the only statement types that cannot accept BIND VARIABLES.

PreparedStatements or CallableStatements should be used for EVERY OTHER type of statement (DML, Queries). As these are the statement types that accept bind variables.

This is a fact, a rule, a law -- use prepared statements EVERYWHERE. Use
STATEMENTS almost no where.


about the maximum number of queries there is no practicle limit


Shailesh
[ June 19, 2006: Message edited by: Shailesh Chandra ]

Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: prepared or general statement in JDBC
 
Similar Threads
prepared stament for no of users
How does the database know to store prepared statement
SQL Logs For CMP
Prepared JDBC statements in Servlets?
insert 650 fields into oracle table