MyDocument.rb
def load_rows_and_columns
		if @table
			begin
				db = SQLite3::Database.new(@file, :results_as_hash => false, :type_translation => false)
				db.busy_timeout(100)
				sql = "select * from #{ @table }"
				sql += " order by #{ @order }" if @order and @order.strip != ''
			
				result = db.execute2(sql)
				@columns = result.shift
				@rows = result
			rescue SQLite3::SQLException => e
				puts e
			end
			
			db.close
		end
	end
###
# Loads all data for the current table into instance variables:
# @rows and @columns
###
Loads all data for the current table into instance variables.
Loads all data for the current table into instance variables .
def load_rows_and_columns
		if @table
			begin
				db = SQLite3::Database.new(@file, :results_as_hash => false, :type_translation => false)
				db.busy_timeout(100)
				sql = "select * from #{ @table }"
				sql += " order by #{ @order }" if @order and @order.strip != ''
				result = db.execute2(sql)
				@columns = result.shift
				@rows = result
			rescue SQLite3::SQLException => e
				puts e
			end
			db.close
		end
	end
def load_rows_and_columns if @table begin db = SQLite3 :: Database . new ( @file , :results_as_hash => false , :type_translation => false ) db . busy_timeout ( 100 ) sql = "select * from #{ @table }" sql += " order by #{ @order }" if @order and @order . strip != '' result = db . execute2 ( sql ) @columns = result . shift @rows = result rescue SQLite3 :: SQLException => e puts e end db . close end end
Loads all data for the current table into instance variables:
Loads all data for the current table into instance variables :
rows
None