Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Executing SQL statement
Executing SQL statement [message #593813] Tue, 11 November 2008 17:08
Eclipse UserFriend
Originally posted by:

Up until now when I was interested in the contents of a table I accessed
the contents through an SQL statement using the java.sql.* package.
With DTP this is something like the flowing:

IConnectionProfile profile;
String sql = "select * from some_table";
Connection conn = (Connection)
try {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sql);
if ({
// something found found so do something
} else {
// nothing found so do something else
} catch (SQLException e){

I noticed there are classes/interfaces like
org.eclipse.datatools.modelbase.sql.query.impl.QuerySelectSt atementImpl.
How can I make use of this to access the data in my database table while
ignoring the underling connection infrastructure (JDBC connection will
only work if the data source driver is a JDBC driver).
So here is the question: How do I access my data in an abstract way?

I hope someone has some helpful thoughts.


Previous Topic:Accessing table for MySQL database
Next Topic:Multiple Statement Delimiter
Goto Forum:

Current Time: Thu May 24 06:34:38 GMT 2018

Powered by FUDForum. Page generated in 0.01886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top