On Tuesday, July 31, 2012 8:57:56 AM UTC-7, Tedi Roca wrote:
>
> I'm trying to connect to an Oracle database without without much success
> so far. This is what I'm doing:
>
> require "sequel"
>
>
> DB=Sequel.connect('oracle://user:[email protected]:1521/orcl')
>
>
> DB["select * from sample_table"]
>
>
> I don't get anything when I run the script. Even if I put a wrong IP
> address I don't get any error. That's the output:
>
> C:\test\testara>ruby prueba.rb --trace
>
>
> ================================================================================
>
>
>
> I'm probably doing something stupidly wrong... any leads?
>
You aren't actually running any queries, so no actual database connection
is made. If you want to test the connection before returning from
Sequel.connect, add a ?test=t to the end of your connection string.
Alternatively, add a .all at the end of your dataset so that it actually
runs the query.
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sequel-talk/-/RLfxU-NxGDwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.