This content has been marked as final. Show 4 replies
Different database/schema is a common mistake made.
Thanks for the reply but can you please elaborate little more? I am using same database connection parameters in the weblogic datasource and in SQL Develeoper where the same query works fine.
- in one place you get result A
- in another place you get result B
If the query is -exactly- the same, apparently the dataset is different. There is no magic going on. So yeah? Different database? Different user with different rights?
Welcome to the forum!
When I test the same query in SQLDeveloper(1.5.4), it is executing fine and I get the result. But in the code above "rs.next()" is returning false.
Then, as already suggested, that means there is no result set 'for that query, by that user, on that database'.
So since you know there must be something different you need to find out what the difference is.
To identify the user add code to query the user from the database
If the user is the same then add code to query the database information
SELECT USER FROM DUAL;
One of those queries will give you a difference.
select name, created, platform_id, platform_name, db_unique_name from v$database
You can also use the 'getmetaData' method on the connection instance to get a DatabaseMetaData instance and then query it to get database specific information.