Re: DATE_FORMAT not working with connector/j 3.1.7
Posted by: R Fields
Date: March 16, 2005 04:15PM


We are getting mixed results for this bug fix (we are using mysql-connector-java-3.1-nightly-20050316-bin.jar).

In some snippets of code, it now appears to be working, and we are getting a String back. In others, we continue to get the blob.

The following snippet of code (that we use to map the results into a Vector of Hashtables) continues to have the problem:

public static Vector createResultsVector(ResultSet rs) throws DBException {
try {
Vector resultVector = new Vector();
ResultSetMetaData meta = rs.getMetaData();
while ( {
Hashtable currentRow = new Hashtable();
for (int i = 1; i <= meta.getColumnCount(); i++) {
Object data = rs.getObject(i);
// let's print this out to see what we're getting here
System.out.println(meta.getColumnName(i) + "-" + data.getClass().getName());
if (data != null) {
currentRow.put(meta.getColumnName(i), data);
return resultVector;
catch (SQLException e) {
cat.error("DB.createResultsVector failed: " + e.getMessage());

Thank you,

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.