From: Ted Date: 2002-11-18T16:04:46+09:00 Subject: ruby.dbi Here's the code: 1 #!/usr/local/bin/ruby 2 require 'dbi' 3 begin 4 query = '' 5 File.open("mbo.sql"){|f| query << f.readlines.to_s} 6 sqlStatement = query 7 DBI.connect('DBI:pg:DeMolay','user','password') do |dbh| 8 dbh.select_all(sqlStatement) do | row | 9 puts row 10 end 11 end 12 rescue Exception=>e 13 p e 14 end Here's the run: ted@acacia:DeMolay > ./test.rb # ted@acacia:DeMolay > It appears to be issued on line 8, but my search of the reference material doesn't solve it. Also, why the reassignment of query to sqlStatement? Ted