# Help understanding data returned from ODBC 'indexes' call?

**URL:** <https://www.ruby-forum.com/t/help-understanding-data-returned-from-odbc-indexes-call/81553>\
**Category:** Ruby\
**Created:** [January 9, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/help-understanding-data-returned-from-odbc-indexes-call/81553 "2007-01-09T22:00:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_McMahon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/74df32/32.png) [@Chris\_McMahon](https://www.ruby-forum.com/u/Chris_McMahon)\
**Post date:** [January 9, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/help-understanding-data-returned-from-odbc-indexes-call/81553/1 "2007-01-09T22:00:48Z")

</div>

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
