basi wrote:

>Hello,
>During insert inside a loop, after the first insert was successful, the
>second failed with this error: :
>
>RuntimeError: Table already has index record for recno: 1
>	from c:/ruby/lib/ruby/site_ruby/kirbybase.rb:2514:in `add_index_rec'
>	from c:/ruby/lib/ruby/site_ruby/kirbybase.rb:491:in `add_to_indexes'
>	from c:/ruby/lib/ruby/site_ruby/kirbybase.rb:841:in `insert_record'
>	from c:/ruby/lib/ruby/site_ruby/kirbybase.rb:828:in
>`with_write_locked_table'
>	from c:/ruby/lib/ruby/site_ruby/kirbybase.rb:828:in `insert_record'
>	from c:/ruby/lib/ruby/site_ruby/kirbybase.rb:1548:in `insert'
>	from (irb):36
>	from (irb):26:in `each'
>	from (irb):26
>	from :0
>
>Here's the insert command:
>
>tgl_texts.insert do |r|
>    r.source = lines[0]
>    r.sourcedate = lines[1]
>    r.title = lines[2]
>    r.author = lines[3]
>    r.type = lines[4]
>    r.filename = fn
>    r.text = text
>  end
>
>The command is inside a files.each do ... end block.
>
>Isn't recno managed automatically?
>
>  
>
Yes.  An index is automatically created for recno and it should all be 
transparent.  I will check into this and get back to you.

>KirbyBase is an excellent lightweight highly accessible data storage
>system!
>  
>
Thanks!

Jamey Cribbs

Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.