Click to See Complete Forum and Search --> : JDBC-ODBC with Access


Casanova
September 22nd, 2000, 12:01 PM
Hi all!

Could you please help me....

I have created a table using JDBC-ODBC which contains a rows and columns of strings. I would like to select a cell and extract the string from the cell, however this is causing me some problems.

I manage to do the following code:



try {

// get column heads
ResultSetMetaData rsmd = resultSet.getMetaData();

switch( rsmd.getColumnType( adjustedCol ) ) {
case Types.VARCHAR:
case Types.LONGVARCHAR:

System.out.println("GetString1: " );
System.out.println("GetString2: " + resultSet.getString( adjustedCol ) );

break;
case Types.INTEGER:
break;
default: ;
}
} catch (SQLException evt) {}





When I select a cell of a string the above switch loop is executed. The getString1 print statement is displayed as expected, however the second print statement is not.


Casa