# How to get data from database as string

**URL:** <https://www.ruby-forum.com/t/how-to-get-data-from-database-as-string/107871>\
**Category:** Ruby\
**Created:** [June 27, 2007, 1:06am UTC](https://www.ruby-forum.com/t/how-to-get-data-from-database-as-string/107871 "2007-06-27T01:06:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![maung](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ac91a4/32.png) [@maung](https://www.ruby-forum.com/u/maung)\
**Post date:** [June 27, 2007, 1:06am UTC](https://www.ruby-forum.com/t/how-to-get-data-from-database-as-string/107871/1 "2007-06-27T01:06:15Z")

</div>

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)  
cursor.exec()  
puts cursor  
conn.logoff

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

Thanks,  
Maung
