Newbie: populate an array from database (oci8) results

Discussion in 'Ruby' started by jasonnaylor.tester@googlemail.com, Jul 2, 2007.

  1. Guest

    Simple, newbie query. Should be easy enough, but my Ruby knowledge is
    in it's early stages.

    I want to populate a 2d array with results of an Oracle DB query.

    I'm doing something like:

    connection = OCI8.new('yada', 'yada', 'yada')
    connection.exec('select one, two from table_name') do |r|

    And now I'm lost. What to actually do with r ?
     
    , Jul 2, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Haydnw
    Replies:
    4
    Views:
    3,937
    Haydnw
    Aug 16, 2004
  2. Monique Y. Mudama
    Replies:
    1
    Views:
    589
    Monique Y. Mudama
    Jun 28, 2005
  3. lovecreatesbeauty
    Replies:
    8
    Views:
    1,977
    Old Wolf
    Sep 12, 2005
  4. Ken Fine
    Replies:
    3
    Views:
    810
    Steven Cheng [MSFT]
    Jul 23, 2008
  5. Enjoy Life
    Replies:
    2
    Views:
    471
    Roland Hall
    Feb 23, 2005
  6. Replies:
    10
    Views:
    742
    Tad McClellan
    Oct 6, 2006
  7. Craig Keightley

    help required to populate search results

    Craig Keightley, Jun 23, 2005, in forum: Javascript
    Replies:
    1
    Views:
    175
    Craig Keightley
    Jun 24, 2005
  8. Craig Keightley
    Replies:
    10
    Views:
    456
    Craig Keightley
    Jun 29, 2005
Loading...