File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes seek API to for constructing SQL strings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "seek API to for constructing SQL strings" Watch "seek API to for constructing SQL strings" New topic
Author

seek API to for constructing SQL strings

Frank Silbermann
Ranch Hand

Joined: Jun 06, 2002
Posts: 1379
The SQL language has a syntax that is human-oriented, rather than user-oriented -- designed for entering statements into an SQL client and reading the results. Database programs whose SQL statements are determined at runtime generate SQL statements by concatenating substrings. I find this approach ugly, clumsy and error-prone.

Of course, I could write my own wrapper around the SQL string generation process, but that would take work. Are there any freely available APIs for building SQL command strings programmatically?

Since the relational database already exists, I'd prefer something lightweight, rather than, say, a comprehensive persistence framework such as container-managed EJBs or Hibernate.
Jeff Albertson
Ranch Hand

Joined: Sep 16, 2005
Posts: 1780
iBatis?


There is no emoticon for what I am feeling!
Frank Silbermann
Ranch Hand

Joined: Jun 06, 2002
Posts: 1379
Originally posted by Jeff Albertson:
iBatis?
A quick glance suggests to me that this is another framework for getting Java objects instead of result sets OUT of a database.

I'm not looking to wrap database results. I just want a programmable API to a SQL query builder.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: seek API to for constructing SQL strings
 
Similar Threads
How to start with Hibernate?
Problem in Uploading Text File
Why PL/SQL when you could use Java?
IllegalStateException when inserting session attribute into a table
Using Hibernate for developing Information System in Java