baffling Exception

Posts   
 
    
billb
User
Posts: 50
Joined: 09-Jul-2004
# Posted on: 29-Sep-2004 22:45:28   

I've been using the product for a few months now w/ great success. Recently, we decided to use LLBLGen for another project. I had been using it for project A for many months without issue. So a couple of days ago, I started using it for project B. Today is the first day I've had some code and a database w/ test data to test against. So basically, this the first time LLBLGen had to do anything for project B. The first call to load a collection generates a System.NullReference. I have no idea why. Here's the code:


adapter = new DataAccessAdapter(ConfigurationSettings.AppSettings["DSN"].ToString(),
                false, CatalogNameUsage.ForceName, ConfigurationSettings.AppSettings["CatalogName"].ToString());
            
IRelationPredicateBucket filter = new RelationPredicateBucket();

filter.PredicateExpression.Add(PredicateFactory.CompareValue(EPS_ProcessSourceFieldIndex.Name, ComparisonOperator.Equal, name));

EntityCollection processSourceCollection = new EntityCollection(new EPS_ProcessSourceEntityFactory());

// crash, bang, boom!
adapter.FetchEntityCollection(processSourceCollection, filter);


The database schema for EPS_ProcessSource is as follows: ID_ProcessSource int Name varchar(50) Description varchar(50)

There are only two records in that table and there are no nulls.

One item of interest, when I did some comparing and contrasting between the program that works fine w/ LLBLGen Pro and the one that doesn't, I noticed something a little peculiar. After the constructor call to RelationPredicateBucket, in the system where it doesn't work the members PredicateExpression and Relations both have "System.ArgumentException" when I view them in the debugger. In the system where it works, they do not.

There's not much going on here, so I'm completely at a loss.

P.S. Project A and Project B use two different databases.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 30-Sep-2004 10:08:57   

Very weird. It could be you have different versions of the orm support classes referenced in your application. I.e.: v1.0.2003.3 in the generated code and 1.0.2004.1 in your BL/gui code. Could you please check that for me? You can check the version in code by retrieving RuntimeLibraryVersion.Build and RuntimeLibraryVersion.Version (which are 2 strings and RuntimeLibraryVersion is a struct with 2 constants). You can also click with the right mousebutton on the dll and select properties and then the version tab.

Frans Bouma | Lead developer LLBLGen Pro
billb
User
Posts: 50
Joined: 09-Jul-2004
# Posted on: 30-Sep-2004 14:07:16   

Otis wrote:

Very weird. It could be you have different versions of the orm support classes referenced in your application. I.e.: v1.0.2003.3 in the generated code and 1.0.2004.1 in your BL/gui code. Could you please check that for me? You can check the version in code by retrieving RuntimeLibraryVersion.Build and RuntimeLibraryVersion.Version (which are 2 strings and RuntimeLibraryVersion is a struct with 2 constants). You can also click with the right mousebutton on the dll and select properties and then the version tab.

That was it. flushed

Thank you.