I am facing problem with an Oracle Query in a .net 2.0 based windows application. I am using "System.Data.OracleClient" to connect to oracle database. Name of database is "myDB". Below the the connection string I am using:
*Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.0.24)(PORT = 1522)))(CONNECT_DATA =(SERVICE_NAME = ORCL))); User ID=myDB;Password=myDB;Unicode=True*
If I run the below query then it will given me wrong result (here wrong result means incorrect data. The data doesn't belongs to myDB):
SELECT ID, NAME FROM MyTempTable WHERE ID IN (10780, 10760, 11890)
But if I append the database name along with it the it is giving correct result:
SELECT ID, NAME FROM "myDB".MyTempTable WHERE ID IN (10780, 10760, 11890)
My limitation is that I cannot append the database name as this is a generic application and can run with any database on run time. Please help.