LLBLgenproDataSource - getting all records.

Posts   
 
    
RamonDi
User
Posts: 4
Joined: 05-Apr-2007
# Posted on: 05-Apr-2007 16:37:11   

Hello,

(first of all, excuse my poor english).

I'am using the LLblgenProdatasource to act beetween a gridview and an entity collection.

The DataContainerType and entityCollectionTypename properties are defined in design mode. The gridview datasource property is also defined at design time.

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="Declid"
        DataSourceID="LLBLGenProDataSource1">
        <Columns>
            <asp:BoundField DataField="Declid" HeaderText="Declid" ReadOnly="True" SortExpression="Declid" />

.. .. </Columns> </asp:GridView> <llblgenpro:LLBLGenProDataSource ID="LLBLGenProDataSource1" runat="server" DataContainerType="EntityCollection" EnablePaging="True" EntityCollectionTypeName="ReproDal.CollectionClasses.DidentCollection, ReproDal" MaxNumberOfItemsToReturn="1"> </llblgenpro:LLBLGenProDataSource>


The entitycollection (selfservicing) DidentCollection is filled at runtime and assigned to the Llblprogendatasource also at runtime.

-->

the issues is : If i leave the MaxnumberofitemsToReturn to '0' (default value), its tries to fetch the whole table beforehand.

I don't know if i missed something in the docs, but any help will be welcome.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 05-Apr-2007 16:40:12   

the issues is : If i leave the MaxnumberofitemsToReturn to '0' (default value), its tries to fetch the whole table beforehand.

That's by design, I don't see any problem in this, perhaps you want to elaborate more.

RamonDi
User
Posts: 4
Joined: 05-Apr-2007
# Posted on: 05-Apr-2007 17:03:33   

The problem is , that when i launch the app (leaving the MaxnumberofitemsToReturn to 0) , the llblgenprodatasource control seems to fetch the data before anything else. It end up hanging the IIserver (up to 800 mb used).

The Oracle Session browser repport a massive select.

I wanted to get the data myself (using the entitycollection.getmulti(filter) method). Instead, the LLBLgenprodatasource fill itself with the whole table.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 06-Apr-2007 11:39:49   

I wanted to get the data myself (using the entitycollection.getmulti(filter) method). Instead, the LLBLgenprodatasource fill itself with the whole table.

Set the LLBLGenProDataSource's LivePersistence property to false and handle the PerformWork event yourself.
Please refer to the LLBLGen Pro manual: "Using the generated code -> Adapter/SelfServicing -> Databinding at design time and runtime -> Databinding with ASP.NET 2.0" Check the LivePersistence and events paragraph.

RamonDi
User
Posts: 4
Joined: 05-Apr-2007
# Posted on: 06-Apr-2007 14:19:07   

Thanks for the answer, i have found what i was searching.