Many-to-Many realted DAL tables and design time data-binding

Posts   
 
    
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 08-Jan-2006 12:29:15   

I have the following senario: TableA --(1-to-n)--> TableB --(1-to-n)--> TableC

When I generate the DAL for these tables and want to implement design-time databinding for TableB: 1- drag an entity collection and choose the entiyFactory to be (TableBEntityFactory) 2- Drop a couple of text-boxes on the form 3- bind TextBox1 to TableB.Col1 property from the properties window NOW, when I try to do any extra binding after that first binding I get an error dialog:

dialog title: Properties Window dialog message: Invalid property value extras (click on the Details button and get the following explanation for the error): No value at index 0.

Is this behaviour by design for all tables that are intermediatery tables in 1-to-n relations ??

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 09-Jan-2006 13:55:07   

TableA --(1-to-n)--> TableB --(1-to-n)--> TableC

That's not a m:n setup. Shouldn't the relation between tableb and table c be m:1 ? (just checking).

Either way, please update the runtimes to a version of 23-dec or later. The bug you run into is fixed on 23-dec 2005. Could you please try the hotfix for the runtime libraries, currently available in teh runtime libraries section? That archive contains the fix for this.

Changelogs for hotfixes are copied manually to the CMS and I forgot to copy the fix for this from the readme to the CMS item. flushed

Frans Bouma | Lead developer LLBLGen Pro
JimHugh
User
Posts: 191
Joined: 16-Nov-2005
# Posted on: 09-Jan-2006 15:42:42   

Otis wrote:

Either way, please update the runtimes to a version of 23-dec or later. The bug you run into is fixed on 23-dec 2005.

Just wanted to verify the date of the latest release posted.

According to http://www.llblgen.com/pages/secure/runtimelibraries.aspx, the latest version posted is 22-dec 2005.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 09-Jan-2006 15:52:00   

that's the official one. The 3rd item in the list is the hotfix one. I re-published the cms item, so it now also reflects the correct changelog for the hotfix.

Frans Bouma | Lead developer LLBLGen Pro
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 09-Jan-2006 18:43:43   

Otis wrote:

TableA --(1-to-n)--> TableB --(1-to-n)--> TableC

That's not a m:n setup. Shouldn't the relation between tableb and table c be m:1 ? (just checking).

Either way, please update the runtimes to a version of 23-dec or later. The bug you run into is fixed on 23-dec 2005. Could you please try the hotfix for the runtime libraries, currently available in teh runtime libraries section? That archive contains the fix for this.

Changelogs for hotfixes are copied manually to the CMS and I forgot to copy the fix for this from the readme to the CMS item. flushed

You'r right Frans about my typo describing the relations. I downloaded the 8-JAN-2006 fix and it did the trick with one annoyance. After I add the entityCollection to VS's design surface and then try to do the first data-binding for the collection, VS fires an error dialog: Dialog Title: Micorosoft Development Environment Dialog Message: Specified argument was out of the range of valid values. Parameter name: Index was out of range. Must be non-negative and less than the size of the collection. After dismissing this dialog, I can do data-binding with no problem. As I said its just an annoyance and not a show stopper.

P.S.: proparly I should've mentioned this as I started the thread. I am using VS.NET2003

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 09-Jan-2006 18:50:07   

Ok, I'll try to reproduce it here in vs.net 2003.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 12-Jan-2006 10:57:24   

I can reproduce it, the stupid thing is: I can't find where it originates from, because the stupid IDE won't show me a stacktrace and no matter where I place breakpoints, the code there succeeds but apparently after that routine fails, however where... I have no idea.. rage what's up with MS developers that they think a stacktrace is something stupid and isn't necessary: in the IDE, on the CF.NET framework...

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 12-Jan-2006 11:29:48   

Ok, I checked the change I made on dec 23, and when reverting that change it worked again. THe change is in the OnListChange event handler, completely irrelevant for the error, wherever it may occur, but of course the change is required, so I checked what could be the problem then: it seems to be new properties added to an entity.

If the collection contains a type which has new properties you added yourself, or a containing collection does, this error occurs. I'm now looking into why this error occurs, and where... still haven't found that out. What's odd also is that with the change rolled back, the code works as expected and I don't get the error you experiencing. (on vs.net 2003).

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39930
Joined: 17-Aug-2003
# Posted on: 12-Jan-2006 11:48:52   

I'll rollback the change for vs.net 2003. What's weird is that I can't reproduce the error you get in the first place, Omar...

Frans Bouma | Lead developer LLBLGen Pro
omar avatar
omar
User
Posts: 569
Joined: 15-Oct-2004
# Posted on: 12-Jan-2006 19:16:01   

Otis wrote:

I'll rollback the change for vs.net 2003. What's weird is that I can't reproduce the error you get in the first place, Omar...

Thanks Frans for all the effort... I will download the 12-dec version now... simple_smile