Metadata is displayed is old through JDBC even if Table is altered [message #462830] |
Mon, 28 June 2010 02:02 |
mamathakv
Messages: 6 Registered: June 2010 Location: bangalore
|
Junior Member |
|
|
Hi,
Oracle 10g
Java 1.5
I have altered the table column Char(79) to Varchar2(4000)from a java program.
Iam able to view this change in both TOAD as well as SQL plus.
But when I try to view the DatabaseMetaData the java program displays the old data that is Char(79).
However, the same Java Program works fine for Oracle 9i and the DatabaseMetaData reflects the modified Varchar2(4000).
Why is this behaviour with JDBC with oracle 10g.
Thanks
Mamatha
|
|
|
|
Re: Metadata is displayed is old through JDBC even if Table is altered [message #462833 is a reply to message #462831] |
Mon, 28 June 2010 02:11 |
mamathakv
Messages: 6 Registered: June 2010 Location: bangalore
|
Junior Member |
|
|
This is my sample program that is trying to view the column type information
DatabaseMetaData meta = conn.getMetaData();
ResultSet cols = meta.getColumns(null,null, "myTable", null);
while (cols.next()) {
String col_name = cols.getString("COLUMN_NAME");
if (col_name.equals("BASE_LANGUAGE_TERM"))
{
String col_Type = cols.getString("TYPE_NAME");
}
System.out.ptintln(col_Type);
}
|
|
|
|
|
|
|