require 'rubygems'
require 'activerecord'

ActiveRecord::Base.establish_connection(
  :adapter  => "postgresql",
  :host     => "nelke.enda.eu",
  :username => "e_prtr",
  :password => "e_prtr",
  :database => "e_prtr"
)

class Bundesland < ActiveRecord::Base
  self.table_name = "elist1001"
end

@land = "07"
land = Bundesland.where("bland = ?", @land).first
if land == nil
  puts "Nichts gefunden"
else
  puts land.ktext
end
