I use a remote 4D v11 database and an ODBC 4D Driver on Windows to access and read the data. The issue is about some rows of a table: these rows have columns beginning with a space character. It's intended.
My java application has to retrieve these columns with their first space character. But it doesn't work.
The ODBC 4D driver works fine. Testing it using Microsoft Query in Excel, reading the table the columns have their first space character.
In my java program, i use the JDBC ODBC Driver (jdk 1.7.0_51). The open(), Statement, execute() and ResultSet instructions or classes are standard JDBC. Unfortunately, the first space character is never retrieved when reading.
The column is seen as CLOB:
int myColumnWithFirstSpace = 5;
ResultSetMetaData rsmd = rs.getMetaData();
String type = rsmd.getColumnTypeName(myColumnWithFirstSpace );
System.out.println(type); // print CLOB
The only class supported is String:
String text= rs.getString(myColumnWithFirstSpace);
// other types return "Operation not yet supported"
System.out.println(text); // print the content of the column
And unfortunately no first space character in the printed text. Where can be the error? Thanks!