aspose file tools
The moose likes JDBC and Relational Databases and the fly likes jdbc template vs hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "jdbc template vs hibernate" Watch "jdbc template vs hibernate" New topic

jdbc template vs hibernate

David Thompon

Joined: May 24, 2014
Posts: 2
What is the best way to securely pass SQL in a Java application? Today I heard that jdbc template was the best.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 31385

Welcome to CodeRanch!

The key is to make sure the SQL is secure by itself. This is true regardless of what persistence technology you use. The most important rule is to make sure you always use bind variables (? in JDBC) for any data that could be supplied by the user.

[OCA 8 book] [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
I agree. Here's the link:
subject: jdbc template vs hibernate