Check if table exists

Posts   
 
    
Posts: 14
Joined: 13-Apr-2009
# Posted on: 29-Jun-2010 23:19:40   

Hi

What is the best way to check if a specific table (MS Access) exists with LLBLGen Pro?

Desbaratizador

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Jun-2010 04:29:51   

The first assumption is that if you have generated a mapped entity based on some table, that table should exist, otherwise something very bad is happening in your database smile

Also, if you fetch some entity/entitycollection and you obtain an exception saying that "you are querying an invalid object" then that could be a way.

You also can create some special stored procedure that inside query the sys/master tables to check for the existence of an object. You can call that stored procedure from llblgen.

David Elizondo | LLBLGen Support Team