B
basi
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?
KirbyBase is an excellent lightweight highly accessible data storage
system!
gk
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?
KirbyBase is an excellent lightweight highly accessible data storage
system!
gk