Question

I'm using the times ten demo odp on a windows 7 box and have followed all the steps. I have a tnsnames.ora entry as follows

sampledb_1122 =(DESCRIPTION=
(CONNECT_DATA = 
    (SERVICE_NAME = sampledb_1122)
    (SERVER = timesten_direct)
)

)

The driver I'm using is ttdv1122d.dll

and using the following as the connection string:

connStr = @"Data Source=sampledb_1122:timesten_direct;user id=appuser;password=appuser";

I've also tried:

connStr = @"Data Source=localhost/sampledb_1122:timesten_direct;userid=appuser;password=appuser";

When I try opening the connection con.Open() for the oracle connection, it fails and throws the error ORA-29158: Unable to open library

I'm able to connect using ttisql cmd prompt and see all the data.

Any help on what I'm missing. I have oracle times ten 1122 installed.

Thanks, Nikhil

Was it helpful?

Solution 2

So the problem wasn't the connect string but the ODAC version. I changed it to 4.11.2.3.0 and also changed the properties of my project in visual studio to be a 64 bit and unchecked the prefer 32 bit. Compiled and ran it and was able to connect to the times ten instance. The final connection string was the following:

"Data Source=sampledb_1122;user id=appuser;password=appuser;Statement Cache Size=0"

OTHER TIPS

try to connect with this string "DSN=MyDSN;UID=MyUser;Pwd=MyPassword;OraclePWD=OracleDbPassword";

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top