Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Server DDO's current record does not match psCurrentRowId

  1. #1
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Server DDO's current record does not match psCurrentRowId

    Hi everybody

    I am having a problem I don't really understand.

    I have a cWebGrid which is throwing the following error every time I try to change to a new row:

    Code:
    Assert: Server DDO's current record does not match psCurrentRowId
    DataFlex Error#: 4402 in line: 26611.
    There doesn't seem to be anything very special about the Grid. The same overall logic works in the Windows version. If I convert it to a cWebList (not actually a viable solution, BTW - I need it to enter data) there is no problem.

    The grid's Server is set to a child DDO, while all of the Entry_Items are on a (non-constraining) parent table of that DDO - there is another (constraining) parent. The actual error is happening in AllowChangeSelectedRow in the cWebGrid.pkg (line 307), which is why there is no problem in a cWebList - in that AllowChangeSelectedRow just returns True; not so with the grid.

    The problem is that the list's Server object does not seem to have a current RowID.

    The following code in the object seems to fix the problem (by brute-forcing the Grid's server to have the correct row loaded before it hits the assertion in AllowChangeSelectedRow), but I'm worried that it might really just be hiding it, not actually solving it:
    Code:
                            Function ChangeCurrentRow String sGotoRow String sToRowID Returns Boolean
                                String  sRowID
                                RowID   riRowId riD
                                Boolean bOK
                                Handle  hoServer
                                
                                WebGet psCurrentRowId               to sRowID
                                Move (DeserializeRowID(sRowID))     to riRowId
                                Get Server                          to hoServer
                                Get CurrentRowId of hoServer        to riDD       // This is always empty
                                
                                If not (IsSameRowID(riRowId, riDD)) ;
                                    Send FindByRowId of hoServer (Main_File(hoServer)) riRowID
    
                                Forward Get ChangeCurrentRow sGotoRow sToRowID to bOK
                                Function_Return bOK
                            End_Function
    If I comment-out the lines in blue, the error occurs and navigating off the row fails; with them in, it works.

    And before you ask the obvious question: "Could it be to do with the DDO structure?"... the answer it "Yes, I am afraid it could" - there are almost 60 involved (so as complicated as all whatever!), but that structure is (AFAIK) identical to the one in the (working) Windows version (I copied it).

    Anybody have an idea what might be wrong and why/how it could be happening?

    Mike

    (PS - v19.1.58)
    Last edited by Mike Peat; 17-Dec-2019 at 12:31 PM. Reason: DF version

  2. #2
    Join Date
    Nov 2008
    Location
    Round Rock, TX
    Posts
    8,850

    Default Re: Server DDO's current record does not match psCurrentRowId

    Hi Mike,

    it might be that there's a DDO not being synchronized because it is not in the view's DDO structure.

  3. #3
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Server DDO's current record does not match psCurrentRowId

    Hmm - thanks Dennis, I'll look into that.

    Mike

  4. #4
    Join Date
    Feb 2009
    Location
    The Netherlands
    Posts
    4,674

    Default Re: Server DDO's current record does not match psCurrentRowId

    Note that you can use AddDdoStructure to make sure additional structures (not related to the main DD) are synced.

  5. #5
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Server DDO's current record does not match psCurrentRowId

    Thank Harm

    I am going to spend my morning working out how the almost 60 DDOs involved are connected. Really looking forward to that!

    Mike

  6. #6
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,321

    Default Re: Server DDO's current record does not match psCurrentRowId

    Mike

    all you have to do is look at the doc ...
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  7. #7
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,812

    Default Re: Server DDO's current record does not match psCurrentRowId



    Umm... which bit, specifically?

    Mike

  8. #8
    Join Date
    Feb 2009
    Location
    The Netherlands
    Posts
    4,674

    Default Re: Server DDO's current record does not match psCurrentRowId

    Note that to find these issues you might want to set pbShowAllRefindErrors to true on your cWebApp object. This will enable errors during the sync process. By default these are not shown as they might be caused by changes from a different user.

  9. #9
    Join Date
    Feb 2009
    Location
    Stuart, FL
    Posts
    5,321

    Default Re: Server DDO's current record does not match psCurrentRowId

    the one where you documented the DDO structure silly ;-)
    Michael Salzlechner
    StarZen Technologies, Inc
    http.://www.starzen.com

    IT Director at Balloons Everywhere

    Development Blog
    http://www.salzlechner.com/dev

    DataFlex Package Manager (aka Nuget for DataFlex)
    http://windowsdeveloper.com/dfPackage

  10. #10
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,446

    Default Re: Server DDO's current record does not match psCurrentRowId

    Hi Mike

    Was searching for something else in the forum, and just found a similar thread, opened as well by you in Sept this year..

    https://support.dataaccess.com/Forum...psCurrentRowId
    Samuel Pizarro

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •