Posted By:
zhebin_cong
Posted On:
Wednesday, November 19, 2003 03:32 AM
hello: i write a sql clause-"select * from emp",and want to connect to oracle database(scott/tiger) in my java programmer,after it is executed,the resultset(rset) can be returned correctly,then i invoke following clause: rset.next(); System.out.println(rset.getString(2)); System.out.println(rset.getMetaData().getTableName(2)); the first clause can return the correct result("smith"),but the second clause return the empty string(" "),the correct result should be "emp".even i change to use the OracleConnection,OracleStatement and OracleResultSet,it still don't work,why?who can help me,and how can i return the table name that the column belong to? thank you!
More>>
hello:
i write a sql clause-"select * from emp",and want to connect to oracle database(scott/tiger) in my java programmer,after it is executed,the resultset(rset) can be returned correctly,then i invoke following clause:
rset.next();
System.out.println(rset.getString(2));
System.out.println(rset.getMetaData().getTableName(2));
the first clause can return the correct result("smith"),but the second clause return the empty string(" "),the correct result should be "emp".even i change to use the OracleConnection,OracleStatement and OracleResultSet,it still don't work,why?who can help me,and how can i return the table name that the column belong to?
thank you!
<<Less