Hey Guys,
Im a newbie to SimpleJdbcDaoSupport, and am trying to do a simple select statement from my database table to get one field and return a
string as follows.
<blockquote>
code:
<pre name="code" class="core">
String query = "SELECT id FROM table WHERE name = 'test'";
ps = getConnection().prepareStatement(query);
rs = ps.executeQuery();
if (rs.next())
{
strResult = rs.getString("id");
}
</pre>
</blockquote>
Now i want to convert the above to use SimpleJdbcDaoSupport and i see SimpleJdbcDaoSupport has getSimpleJdbcTemplate() and getJdbcTemplate() which gives methods such as query but each query method seems to take 2 or more arguemts such as sql and mapping object and returns an object or list, Is there the ability to just give an sql statement and get the returned result as a string?? or equivelent??
best
Mark