Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Error when using paging and inheritance
 

Pages: 1
Bugs & Issues
Error when using paging and inheritance
Page:1/1 

  Print all messages in this thread  
Poster Message
TomV
User



Location:
Belgium
Joined on:
31-Jan-2008 14:22:10
Posted:
76 posts
# Posted on: 04-Aug-2010 09:22:10.  
Hello

We have a resource table which is discriminated (employee, visitor, car) which contains thousands of records and is linked to many other tables as it's the core of our system. Loading the entire object graph for all employees takes about 6 seconds which is too long. I was playing with paging to speed up initial loading of our control, but I run into an error...

I have +/- 24000 records in the resource table (10000 employees, 9000 visitors and 5000 cars). When I load the cars with code below, everything goes ok, and my grid is filled per 1000 cars. But with both visitors and employees the first 1000 records are loaded, and then I receive an error...

In attachment you see the details of the error I receive...
When I load all employees without paging, I don't have any problem...

Code:


private void LoadDataInBackGround(object o)
     {
         try
         {

            if (Paging)
            {
             IEntity2 en = Activator.CreateInstance(HostControl.MasterType, true) as IEntity2;

             IEntityFields2 fields = new EntityFields2(1);
             fields.DefineField(en.PrimaryKeyFields[0], 0);
            
             int totalRows = Main.DataServer.Adapter.GetDbCount(fields, DefaultFilterPredicate, null, false);
             int pages = (totalRows / 1000) + 1;

             for (int i = 1; i <= pages; i++)
             {
                 EntityCollection<T> entitiesToFetch = CreateEntityCollection();
                 entitiesToFetch.RemovedEntitiesTracker = CreateEntityCollection();
                 Main.DataServer.FetchEntityCollection<T>(Main.Token, entitiesToFetch, PrimaryPrefetchPath, DefaultFilterPredicate, PrimarySorter, i, 1000);

                 if (i == 1)
                     OnDataLoaded(entitiesToFetch);
                 else
                     OnMoreDataLoaded(entitiesToFetch);
             }
            }
            else
            {
             EntityCollection<T> entitiesToFetch = CreateEntityCollection();
             entitiesToFetch.RemovedEntitiesTracker = CreateEntityCollection();
             Main.DataServer.FetchEntityCollection<T>(Main.Token, entitiesToFetch, PrimaryPrefetchPath, DefaultFilterPredicate, PrimarySorter);
             OnDataLoaded(entitiesToFetch);
            }
         }
         catch (EMFetchException ex)
         {
            Main.HandleError(ex, c, "LoadData()");
         }
     }



Best regards,
TomV
Life goes fast, it must be riding a Ducati!  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14569 posts
# Posted on: 04-Aug-2010 10:12:47.  
Could you please translate the exception message (in the attached pic) into English?

  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37812 posts
# Posted on: 04-Aug-2010 12:34:03.  
Walaa wrote:
Could you please translate the exception message (in the attached pic) into English?

"An error was found in column, parameter or variable #6: type 'Variant' isn't found."

what's the ormsupportclasses build nr you're using and the SQL Server DQE build nr (dll file version -> windows explorer -> right click -> properties -> version tab)
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.