I try to read out a table and write it into a csv file.
while (rs2.next())
{
Enumeration<String> en = sqlfields.keys();
while (en.hasMoreElements())
{
String field = en.nextElement();
String value = rs2.getString(field);
bw.write(Kapseln + value + Kapseln + Trennzeichen);
}
bw.newLine();
cur++;
}
But if the field is type: DateTime, I get this error message:
java.sql.SQLException: Cannot convert value
'0000-00-00 00:00:00' from column 12 to TIMESTAMP.
Why Java tries to convert to a Timestamp?
I like to get the value as String => rs2.getString(field)