`init': OCI Library Initialization Error (DBI::DatabaseError

N

Namit Jain

Hi All

I tried to connect Oracle with Ruby but on executing the ruby script it
gave the following error

`init': OCI Library Initialization Error (DBI::DatabaseError}.

To connect to DB I had the following configuration

Installed Ruby 1.8.6
I verified that OCI.dll is present in bin folder of Oracle.
Included oci8.rb in the script.

My test script just uses a single query to get result form the DB.
Which is
resultSet1=fireQuery('SELECT item_id FROM item WHERE item_id
=?',4120788)

This script require another rb file that is DBConnect(I have attached
this file for everyone's reference)



The error displayed refers to the line no 52 of oci8.rb which is
"@@env = OCIEnv.init()"I read several documentation but still I am not
able to figure out where the problem is. Online search showed that
oraociei10.dll should be present where the oci.dll is present. I did
this also and copied this dll where the oci.dll is present but still I
got the same error.

Please let me know where I am going error. Sorry If I am doing some
fundamental thing wrong, but please help me out.

Please Ask for more information in case I have missed out something.

Any kind of help will be highly appreciated

Thanks
Namit

Attachments:
http://www.ruby-forum.com/attachment/3952/DBConnect.rb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top