LLBLGenProDataSource2 and GridView update

Posts   
 
    
Posts: 94
Joined: 23-Aug-2006
# Posted on: 18-May-2009 00:37:06   

I am missing something really really obvious. The code below wires a gridview to a llblgends. Everything seems to work fine until I try to update values. Nothing changes and no errors are thrown. As far as I know with livepersistence its supposed the example should work. Bet I am missing something really pedestrian and obvious. I just cant tell what the heck it is. Do I have to manually wire up the controls that do the updating? If so, I could use an example. I traced the execution. Here is what it showed.

Method Enter: DataAccessAdapterBase.SaveEntity(4) Method Enter: DataAccessAdapterBase.DetermineActionQueues(7) Method Exit: DataAccessAdapterBase.DetermineActionQueues(7) Method Exit: DataAccessAdapterBase.SaveEntity(4): no entities to save.

Thanks in advance for suggestions.

<llblgenpro:LLBLGenProDataSource2 ID="LLBLGenProDataSource1" runat="server" 
            AdapterTypeName="Caremore.DatabaseSpecific.DataAccessAdapter, CaremoreDBSpecific" 
            DataContainerType="EntityCollection" 
            EntityFactoryTypeName="Caremore.FactoryClasses.DivisionDepartmentEntityFactory, Caremore" 
            LivePersistence="true" EnablePaging="True" >
    </llblgenpro:LLBLGenProDataSource2>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" 
        DataSourceID="LLBLGenProDataSource1" ForeColor="#333333" GridLines="None" DataKeyNames="DivisionDepartmentId">
        <RowStyle BackColor="#EFF3FB" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:BoundField DataField="DeptCode" HeaderText="Dept Code" />
            <asp:BoundField DataField="DeptName" HeaderText="Dept. Name" />
            <asp:BoundField DataField="GLNumber" HeaderText="GL Number" />
        </Columns>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-May-2009 07:20:42   

Which llblgen pro runtime library versin are you using? What happens when you add a column for the PK?

Posts: 94
Joined: 23-Aug-2006
# Posted on: 18-May-2009 15:13:18   

I am using 2.6.8.1114 Adding a PK column to the gridview did not change the behavior at all.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-May-2009 15:15:23   

Strange...I can't reproduce it.

Would you please use the latest build of the runtime library? Thanks

Posts: 94
Joined: 23-Aug-2006
# Posted on: 18-May-2009 16:02:42   

I got the latest runtime libs and they are the same version that I am using. Would be so kind and post your aspx code for your test? I want to compare it to mine.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-May-2009 16:38:00   

Please download the ASP.NET databinding projet from our website(Customers Section - > Downloads).

Posts: 94
Joined: 23-Aug-2006
# Posted on: 18-May-2009 16:46:31   

sorry can you please clarify ... when you say " I can't reproduce the problem" how did you test it? Running a prefab example that we know works may not be the best test to determine why my aspx example doesnt. Can you please post your aspx that you used to test? I will also download the sample. Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-May-2009 17:04:18   

First of all 2.6.8.1114 isn't the latest build. This is 6 months old, and we had many builds along the way.

sorry can you please clarify ... when you say " I can't reproduce the problem" how did you test it? Running a prefab example that we know works may not be the best test to determine why my aspx example doesnt. Can you please post your aspx that you used to test? I will also download the sample. Thanks

I did write this prefab example, and it works against Northwind, and it's the one I always use to test databinding issues.

If you think is not good enough, then I'll have to ask you to provide me with a repro solution (better on Northiwnd or you'll have to supply the databse as well).

Posts: 94
Joined: 23-Aug-2006
# Posted on: 18-May-2009 18:12:47   

Seems we have a communication problem. I took a screenshot of the downloaded runtime files which contains a sql server dll that is the same version as I am using. Are you suggesting your download of RuntimeLibraries_05122009.zip has a different version than that? I will try to attach a screenshot. So I am not quite sure where you get the idea from that your SQL Server dll is a different version.

Secondly, based on your note that you can't reproduce the problem I thought you tried something with the aspx snippet I sent. Of course you cant reproduce an error with an application thats working. Do you see how I might get that impression? Maybe I am misunderstanding you?

I will take your suggestion and try the Northwind approach. Thanks in the meantime. Appreciate your feedback.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-May-2009 20:02:11   

etechpartner wrote:

Seems we have a communication problem. I took a screenshot of the downloaded runtime files which contains a sql server dll that is the same version as I am using. Are you suggesting your download of RuntimeLibraries_05122009.zip has a different version than that? I will try to attach a screenshot. So I am not quite sure where you get the idea from that your SQL Server dll is a different version.

Walaa asked for the "Runtime Library Version", you gave the SqlDQE file version, which is different from the runtime lib. version. It's ok (it's the latest).

etechpartner wrote:

Secondly, based on your note that you can't reproduce the problem I thought you tried something with the aspx snippet I sent. Of course you cant reproduce an error with an application thats working. Do you see how I might get that impression? Maybe I am misunderstanding you?

Would be helpful if you try to reproduce the problem in a Northwind app so we could talk on the same thing.

Now back to your problem, I suspect it's related to the fact the DataKeyNames are missing. Please read this: http://llblgen.com/tinyforum/Messages.aspx?ThreadID=4738&StartAtMessage=0&#25896

David Elizondo | LLBLGen Support Team
Posts: 94
Joined: 23-Aug-2006
# Posted on: 18-May-2009 20:44:14   

Thanks ! As I suspected ... a communication problem. Anyways I will test it out with Northwind. Between the posts and the samples there should be enough info to help me find my problem. BTW - the gridview has a DataKey set to the PK of the entitycollection. Thank you nonetheless for your reply. Much appreciated.

wisedead
User
Posts: 5
Joined: 29-May-2009
# Posted on: 22-Jun-2009 10:34:00   

Hi, I'd like to know if there are some changes for using adapters and datasources recently? Because I've used them in version 2.5 and I've migrated in version 2.6 and I've the following exception: This DataAccessAdapter instance has already been disposed, you can't use it for further persistence activity Object name: 'DataAccessAdapterBase'.

I've verified but I haven't ude the adapter after callind=g Dispose(). So I don't know where comes from this exception. If you've some ideas about this? Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 22-Jun-2009 10:56:02   

Hi wisedead, You have already opened a new thread for this question. let's proceed there. ref: http://www.llblgen.com/TinyForum/NewMessage.aspx?ThreadID=16162