Forum: Ruby how to get data from database as string

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
F948f711c9596cc872a66e158d67cfc0?d=identicon&s=25 Maung Aung (maung)
on 2007-06-27 01:06
Hi all,

How can i read a cell from database and retrieve as a string in ruby
with OCI8?
I was doing like this and didn't succeed:
cursor=conn.parse("Select name
                   From empl where ssn=123456789")
cursor.define(1, String, 20)
puts cursor

Puts statement only print the memory address, doesn't print the string.

This topic is locked and can not be replied to.