help understanding data returned from ODBC 'indexes' call?

C

Chris McMahon

This is really weird and I don't understand what data structure is
coming back from the indexes(table) command. Any suggestions would be
welcome:

indexes_new = @connnew.indexes(table)
indexes_new.each do |ind|
puts ind[5]
end
=>nil
PK_onthetable #THIS IS THE NAME OF THE INDEX

indexes_new = @connnew.indexes(table)
indexes_new.each do |ind|
puts ind[5]
puts "hah"
end
=>nil
hah
PK_onthetable
hah

indexes_new.each do |ind|
puts ind[5][1]
end
=>foo_index.rb:166: undefined method `[]' for nil:NilClass
(NoMethodError)
from foo_index.rb:165:in `each'
from foo_index.rb:165
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,222
Messages
2,571,138
Members
47,755
Latest member
Grazynkaa

Latest Threads

Top