From: Luis Lebron Date: 2006-11-07T03:50:23+09:00 Subject: Ruby ODBC SQL Server Errors I have a ruby script that inserts data into a SQL Server Express database. The inserts work but I keep getting errors like the following "WARNING: STMT 0x2954f50 was not dropped before garbage collection." Here's the script ========================== require 'odbc' c=ODBC::connect('SMD') t1 = Time.now aFile = File.open("C://temp/DMERECAP.SDF") aFile.each_line do |line| if $. < 11 q =c.prepare("Insert into DMERECAP(recptlo,datepaid,invoicenum,dolapplied,payername,hcpc,servdatepd,patnum) values ('#{line[0..6].squeeze(" ")}' ,'#{line[7..16].squeeze(" ")}', '#{line[17..28].squeeze(" ")}', '#{line[29..40].squeeze(" ")}', '#{line[48..87].squeeze(" ")}', '#{line[88..92].squeeze(" ")}', '#{line[145..154].squeeze(" ")}', '#{line[138..145].squeeze(" ").to_i}')") q.execute() end end puts "Import complete." puts Time.now-t1 if c c.disconnect end ============ Any help would be appreciated. thanks, Luis -- Posted via http://www.ruby-forum.com/.