Isolating errors

Posts   
 
    
DrM
User
Posts: 49
Joined: 09-Feb-2004
# Posted on: 08-Apr-2005 11:09:17   

I'm getting a return value of False from a FethEntity call. How do I determine what the query error was?

I've tried the following to no avail:

Try tempAdapter.FetchEntity(arbCat) Catch ex As ORMException Debug.WriteLine(ex.InnerException) Catch ex2 As Exception Debug.WriteLine(ex2.InnerException) End Try

Nothing ever gets trapped what am I missing?

Rogelio
User
Posts: 221
Joined: 29-Mar-2005
# Posted on: 08-Apr-2005 12:43:04   

DrM wrote:

I'm getting a return value of False from a FethEntity call. How do I determine what the query error was?

I've tried the following to no avail:

Try tempAdapter.FetchEntity(arbCat) Catch ex As ORMException Debug.WriteLine(ex.InnerException) Catch ex2 As Exception Debug.WriteLine(ex2.InnerException) End Try

Nothing ever gets trapped what am I missing?

Hi,

May be LLBLGen Pro did not find the primary key that you set in arbCat entity, check if you set all the fields that are part of the primary key.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 09-Apr-2005 11:30:39   

Rogelio has the answer. You can check if the fetch succeeded by checking the return value of FetchEntity. If it's true, the fetch succeeded, otherwise the entity you wanted to load isn't there.

Frans Bouma | Lead developer LLBLGen Pro