Error Being Thrown by code.

Posts   
 
    
Rainbow
User
Posts: 29
Joined: 23-Feb-2004
# Posted on: 01-Mar-2004 15:55:19   

Hi all,

Im grabbing entities from a table and applying a filter so that I do not get all of the results.


EntityCollection directoryCollection = new  EntityCollection(new DirectoryEntityFactory());
RelationPredicateBucket A = new RelationPredicateBucket();
                A.PredicateExpression.Add(PredicateFactory.CompareValue( TotalIngenuity.Module.Directory.DAL.DirectoryFieldIndex.PortalID,ComparisonOperator.Equal,0));
            A.PredicateExpression.AddWithAnd(PredicateFactory.CompareValue( TotalIngenuity.Module.Directory.DAL.DirectoryFieldIndex.Type,ComparisonOperator.Equal,true));

DataAccessAdapter adapterForDirectory = new DataAccessAdapter();
adapterForDirectory.FetchEntityCollection(directoryCollection, A);

This should fill directoryCollection with all the relevant directory entries but it throws an error.

Anyone know what I'm doing wrong? confused

Thanks,

John

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 01-Mar-2004 16:10:19   

which error does it throw?

btw, I think it uses the wrong overload or it can't choose between which overload to use. If you specify a boolean as a value, first specify false for the negate. (thus use the overload which accepts the boolean negate)

Frans Bouma | Lead developer LLBLGen Pro
Rainbow
User
Posts: 29
Joined: 23-Feb-2004
# Posted on: 01-Mar-2004 17:45:21   

Otis wrote:

which error does it throw?

btw, I think it uses the wrong overload or it can't choose between which overload to use. If you specify a boolean as a value, first specify false for the negate. (thus use the overload which accepts the boolean negate)

Hi Frans.

It wasn't a problem with the code but with the deployment of the dlls. Sorry for the unnecessary querstion.

But thanks for the quick response.

With your comment on the use of boolean could you give an example of what you mean?

Many thanks,

John

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 01-Mar-2004 18:01:07   

No, that was just me looking at your code and messing things up simple_smile

What I thought was: calling CompareValue() by specifying 'true' as the value would cause problems with the overload which also accepts a value for negate (boolean). But I was assuming that the value to compare with was optional (as it is in the FieldCompareValuePredicate() object, which is called by the PredicateFactory) however this isn't the case flushed . I was confusing the two. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Rainbow
User
Posts: 29
Joined: 23-Feb-2004
# Posted on: 01-Mar-2004 18:31:05   

Otis wrote:

No, that was just me looking at your code and messing things up simple_smile

What I thought was: calling CompareValue() by specifying 'true' as the value would cause problems with the overload which also accepts a value for negate (boolean). But I was assuming that the value to compare with was optional (as it is in the FieldCompareValuePredicate() object, which is called by the PredicateFactory) however this isn't the case flushed . I was confusing the two. simple_smile

Thanks for your quick responses either way wink

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 01-Mar-2004 20:49:14   

Rainbow wrote:

Thanks for your quick responses either way wink

simple_smile

Btw, is Rainbow v2 using an LLBLGen Pro core or is it used for prototyping? (just curious simple_smile , you may answer by email, people working on dotnetnuke are reading here too wink )

Frans Bouma | Lead developer LLBLGen Pro
bertcord avatar
bertcord
User
Posts: 206
Joined: 01-Dec-2003
# Posted on: 02-Mar-2004 16:01:29   

Otis wrote:

Btw, is Rainbow v2 using an LLBLGen Pro core or is it used for prototyping? (just curious simple_smile , you may answer by email, people working on dotnetnuke are reading here too wink )

who me? wink

Rainbow using LLBLGen core ... interesting..... I know LLBLGen.... I guess I just need to polish up on my C# stuck_out_tongue_winking_eye

bert