BrowserHawk IQ now available! Click here for the full scoop!
Search:
Unable to create instance of cyScape.CountryObj error from BrowserHawk
Created: 8/9/2002    Updated: 9/28/2004
Q   I am receiving this error: 'Unable to create instance of cyScape.CountryObj (class not registered error). It appears that the CountryHawk component (available separately from BrowserHawk) is not installed. To use the Country property, be sure that you have the cyScape CountryHawk product (available from cyscape.com) properly installed, then retry.'

A   BrowserHawk provides a property called Country as a convenience property. When you access the Country property, BrowserHawk creates an instance of the cyScape CountryHawk component under the hood, gets the visitor's country code, destroys the CountryHawk object, and returns the country code to you.

If you do not have CountryHawk installed and access the Country property, you will receive this error. To avoid this error, do not check the Country property if you do not have CountryHawk installed.

Note that if you use FOR EACH / NEXT to iterate through all the properties, you will call the Country property without necessarily meaning to. To handle this you could use something like this:

  for each prop in bhObj
     if prop <> "Country" then
        propVal = bhObj(prop)
     end if
  next
Or if you prefer, you could use ON ERROR RESUME NEXT and check to see if an error occurs when the property being checked is the Country property.

These techniques are demonstrated in the versions of showbrow.asp and browserinfo.asp that ship with BrowserHawk.

    FAQ Home  |  Search FAQ  |  Show New Items  |  Ask a FAQ  |  Notify Me  |  Most Popular     
 
 
Copyright © 1994-2020 cyScape, Inc. All Rights Reserved. ()
ASP, ASP.NET, ColdFusion MX, CFMX, JSP, PHP