Using EditableRootListBase

Using EditableRootListBase

Old forum URL: forums.lhotka.net/forums/t/2392.aspx


gdk9am posted on Tuesday, February 20, 2007

I have an application using CSLA 2.1.3 which maintains a list of Titles such as MR/Mrs/DR.

It has following business objects

TitleEditableRootList  EditableRootListBase<TitleEditableRoot>

TitleEditableRoot Csla.BusinessBase<TitleEditableRoot>

It has two forms

One form with a grid and binding navigator

One form with loose controls and binding navigator

Both forms load the contents of the Title table into TitleEditableRootList

In both forms, I can add records but I cannot update existing records eventhough I have debugged the data portal update code and runs successfully.

Please help

 

 

Michael Hildner replied on Tuesday, February 20, 2007

When you say you can't update records, what are the details? An exception? Is the update method getting called?

gdk9am replied on Tuesday, February 20, 2007

1. The DataPortal_Update method is being called and completes with no exceptions

2. the updated record is not shown in the database

RockfordLhotka replied on Tuesday, February 20, 2007

So you walked through the DP_U() code in the debugger and watched it update the database, but the changes don't appear?

If so, are you using one of the CSLA transaction options (EnterpriseServices or TransactionScope)? Of course both of them only trigger failure if DP_U() were to throw an exception, but that's the next thing I'd check for, is to make sure that you aren't, somehow, having your transaction not commit.

If you are doing manual transactions, are you sure the Commit() method is called?

gdk9am replied on Tuesday, February 20, 2007

Hi

Thanks for your help. I found the problem was with my concurrency field "RowTimeStamp" parameter which has declared as output only parameter instead of inputoutput parameter

Regards

Graeme

Michael Hildner replied on Tuesday, February 20, 2007

What database are you using? If you're using Sql Server, fire up the Profiler and see what the update method is actually sending to the database.

You can copy from the Profiler and paste into a query window in Mangement Studio to help debug.

Hope that makes sense, let me know if it doesn't help.

Regards,

Mike

Copyright (c) Marimer LLC