def getRealmForDbid(dbid)
      @realm = nil
      if USING_HTTPCLIENT
         begin
            httpclient = HTTPClient.new
            resp = httpclient.get("https://www.quickbase.com/db/#{dbid}")
            location = resp.header['Location'][0]
            location.sub!("https://","")
            parts = location.split(/\./)
            @realm = parts[0]
         rescue StandardError => error
            @realm = nil 
         end
      else
         raise "Please get the HTTPClient gem: gem install httpclient" 
      end   
      @realm
   end
def getRealmForDbid(dbid)
      @realm = nil
      if USING_HTTPCLIENT
         begin
            httpclient = HTTPClient.new
            resp = httpclient.get("https://www.quickbase.com/db/#{dbid}")
            location = resp.header['Location'][0]
            location.sub!("https://","")
            parts = location.split(/\./)
            @realm = parts[0]
         rescue StandardError => error
            @realm = nil 
         end
      else
         raise "Please get the HTTPClient gem: gem install httpclient" 
      end   
      @realm
   end
Given a DBID, get the QuickBase realm it is in.