Hi Pavak,

I'm guessing it's a configuration problem. You wouldn't get an error 
piggybacking the call to exec when initializing the OCI8 object. You'd just 
have to do a little more after that. I think your best bet is to google 
'oci8lib.c:127:in oci8lib.so: OCI Library Initialization Error (OCIError)'. I 
saw at least one reference to the error you're getting. There may be something 
there to help move you forward.  


________________________________
 From: Pavak Shah <[email protected]>
To: [email protected] 
Cc: John Fitisoff <[email protected]> 
Sent: Thursday, July 26, 2012 10:49 AM
Subject: Re: [wtr-general] Error in oracle database connection
 

Thanks for your reply Johnson. Even if I dont write .exec after the connection 
string, i got the same error.

On Thursday, July 26, 2012 1:11:20 PM UTC-4, johnssn wrote:
Think DBI is a sort of normalization layer for different types of databases. 
You're calling OCI8 directly, maybe bypassing it for debugging purposes?
>
>
>The arguments for creating the OCI8 object seem OK. It seems most likely that 
>there really is some sort of problem with how it's installed.
>
>
>Once you're able to call the exec method on the OCI8 object you need to do a 
>little more work to get your data. It's been a while but something like this:
>
>
>cursor = conn.exec(string)
>arr = []
>while r = cursor.fetch
>  arr << r
>
>end 
>
>cursor.close
>conn.logoff
>
>
>You'll probably be better off googling on the line numbers and error message. 
>I got a few hits that looked like they may be relevant.
>
>
>I've never used DBI but can understand the attraction. :-) It's not too hard 
>to use the native interfaces but they're all different and OCI8 is more obtuse 
>than most.
>
>
>
>________________________________
> From: Pavak Shah <[email protected]>
>To: [email protected] 
>Sent: Thursday, July 26, 2012 6:58 AM
>Subject: [wtr-general] Error in oracle database connection
> 
>
>Hey,
>
>When I try to connect to oracle database,
>
>I am getting "oci8lib.c:127:in oci8lib.so: OCI Library Initialization Error 
>(OCIError)" error.
>
>The way I am trying to connect is 
>
>require 'oci8'
>require 'dbi'
>
>$connection = OCI8.new('username', 'password', 'database').exec('query ')
>
>Can someone please help me with this.
>
>Thanks,
>-- 
>Before posting, please read http://watir.com/support. In short: search before 
>you ask, be nice.
> 
>[email protected]
>http://groups.google.com/group/watir-general
>watir-general+unsubscribe@ googlegroups.com
>
>
>
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.
 
[email protected]
http://groups.google.com/group/watir-general
[email protected]

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to