pt.moredata.util
Class DBUtil

java.lang.Object
  extended bypt.moredata.util.DBUtil

public class DBUtil
extends java.lang.Object

Useful routines form accessing a database

Author:
ferdez

Constructor Summary
DBUtil()
          Not to be used - all methods are static
 
Method Summary
static java.lang.String Query2Str(java.lang.String SQLcmd, java.sql.Connection conn)
          Returns a String with the value obtained by executing the SQL statement Warning: use carefully, since for each invocation a ResultSet is created and executed against the database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBUtil

public DBUtil()
Not to be used - all methods are static

Method Detail

Query2Str

public static java.lang.String Query2Str(java.lang.String SQLcmd,
                                         java.sql.Connection conn)
                                  throws java.sql.SQLException
Returns a String with the value obtained by executing the SQL statement Warning: use carefully, since for each invocation a ResultSet is created and executed against the database

Parameters:
SQLcmd - The SQL command in string form
conn - The connection to the database
Returns:
A String with the value obtained from the database
Throws:
java.sql.SQLException - Yes it does!