[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

please help !

Pradeepta Swain

12/28/2007 12:16:00 PM

I have installed dbi,oci8,ruby 1.8.6 ,oracle client 9.2 on XP machine
I have tried to connect a remote database using the code

dbh = DBI.connect('DBI:OCI8:ORCL','ftdam','ftdam')

where ORCL is the configuration file tnsnames.ora file.
but I am unable to connect .It is giving error like :

OCI Library Initialization Error

I can connect to the databse using same username ,password and
host string 'ORCL 'in sqlplus .but can't through ruby program ,Anybody
help !!!
--
Posted via http://www.ruby-....

1 Answer

Axel Etzold

12/28/2007 1:29:00 PM

0


-------- Original-Nachricht --------
> Datum: Fri, 28 Dec 2007 21:15:51 +0900
> Von: Pradeepta Swain <pradeepta.swain@hcl.in>
> An: ruby-talk@ruby-lang.org
> Betreff: please help !

> I have installed dbi,oci8,ruby 1.8.6 ,oracle client 9.2 on XP machine
> I have tried to connect a remote database using the code
>
> dbh = DBI.connect('DBI:OCI8:ORCL','ftdam','ftdam')

Dear Pradeepta,

please be more specific in your email headers - you'll
get more replies from people who are actually
competent for your problem :)

From your error message, there appears to be a problem about the file
oci8lib.so (see here:

http://ruby-oci8.rubyforge.org/svn/tags/ruby-oci8-1.0.... )

This article:

http://wiki.rubyonrails.com/rails/pages/HowtoConne...

describes a way to connect to Oracle from Ruby on Rails
( you don't seem to be using it, but nevertheless), so
assuming that you did everything right as described there and
things don't work nevertheless, I'd suggest you try out
using â??oracleâ?? rather than â??ociâ?? as an adapter, which is supposed
to be newer, as described here:

http://blog.andrewbeacock.com/2007/06/how-to-change-your-rails-dat...

Best regards,

Axel


--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/g...