[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

try to connect Ruby to oracle

andre hartawan

12/8/2006 9:46:00 AM

Need an advice please,

I have an error while trying to connect ruby to
oracle.
u can see the error below.What should I do ?

E:\ruby\bin>ruby -r oci8 -e "OCI8.new('hr', 'hr',
'//10.10.xx.xx:1521/oradbx').
exec('select * from JOBS') do |r| puts r.join(',');
end"
E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49:in `create':
ERROR (OCIError)
from E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49

thnx
andre





____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.c...

2 Answers

Paul Lutus

12/8/2006 10:28:00 AM

0

andre hartawan wrote:

> Need an advice please,
>
> I have an error while trying to connect ruby to
> oracle.
> u can see the error below.What should I do ?
>
> E:\ruby\bin>ruby -r oci8 -e "OCI8.new('hr', 'hr',
> '//10.10.xx.xx:1521/oradbx').
> exec('select * from JOBS') do |r| puts r.join(',');
> end"
> E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49:in `create':
> ERROR (OCIError)
> from E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49

1. Have you been able to connect to Oracle using this method before now? In
other words, is this your first effort to connect, or is this the first
time you have had a problem connecting?

2. Is the Oracle server running on the provided address and port?

3. Is the provided SQL accepted when using another way to talk to Oracle?

4. Have you considered putting your Ruby code in a script, which would give
you more control over what happens and how errors are reported?

--
Paul Lutus
http://www.ara...

David Vallner

12/8/2006 9:53:00 PM

0

andre hartawan wrote:
> [snip thread hijack]

Please, don't use the "Reply" function of your email client to start
talking about a topic completely different than the one of the post
you're replying to, but write a new message from scratch. It Makes
Things Confusing (tm).

Disclaimer: if it's the apparent fault of my client and noone else sees
this as an (accidental) hijack of Francis Cianfrocca's about BER, ignore
this message.

David Vallner