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
[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