Possible Duplicate:
What’s the best way to check if person accounts are enabled via Apex Code?
I am wondering if there is a way to determine if PersonAccounts have been turned on in the organization via a query (or some other way). My scenario is that I wrote some code that goes against contacts, and tried to make it generic enough that if PersonAccounts are turned on that it leverages the information stored on that record instead, but I couldn't determine the best (or rather, a working) way to set up logic to branch into the two paths. Is this possible?
UPDATE: To be a bit more specific, I am looking to write a package that does A if PersonAccounts are enabled, and does B if they are not. Logically everything that happens after that is about the same, its just a matter of whether I'm leveraging the PersonAccount or the Contact. From what I can tell, if PersonAccounts are not enabled in the org, you can't even reference that object in APEX code.