InsertUsingStoredProcedure = True, leaves BO dirty


Author
Message
Dustin Taylor
Dustin Taylor
StrataFrame Team Member (938 reputation)
Group: StrataFrame Users
Posts: 364, Visits: 771
Did you write these sprocs yourself or let the DDT generate them? If you wrote them yourself, you can't use the SET NOCOUNT ON command at the top of your sproc (StrataFrame uses the count to determine the number of rows affected.)
Leonard P.
Leonard P.
StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
As a temporary work around I added code to _AfterSave even to accept changes on the current row:

  private void customReport_AfterSave(MicroFour.StrataFrame.Data.AfterSaveUndoEventArgs e)
        {
            foreach (DataRow row in customReport.CurrentDataTable.Rows)
            {
                if (row.RowState == DataRowState.Added)
                {
                    row.AcceptChanges();
                }
            }

        }

I hope to find better way of handeling it withing the Framework.

Leonard P.
Leonard P.
StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)StrataFrame Novice (93 reputation)
Group: Awaiting Activation
Posts: 65, Visits: 306
Hello,

I have a maintenance form. All data operations (update/insert/delete) used to work great, until I decided to handle inserts through a stored procedure.

Well, it's still kind of works, but after new row is added and Save is clicked, BO state remains dirty no matter what. So when form is closing "Would you like to save changes" dialog is displayed, even though user did click save before (many times).

Another thing I am noticing is that BO always sees new row as "New" even after Save is clicked and changes committed to the db, so if user clicks save multiple times it keeps adding the same record over and over again.

Please help. Thank you.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search