NetTalk Central

Author Topic: Record not found error (version 4.31 PR 19)  (Read 5956 times)

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Record not found error (version 4.31 PR 19)
« on: November 24, 2008, 05:56:44 AM »
I upgraded from 4.30 to 4.31 PR 19 and when selecting an order header record from the order header browse I am now getting this error:

record not found: (5) Error 0: from key OrdHeader:PK_OrdHeaderID

This happens when the browse page is first opened/generated.  If I select another row and either change that row or reselect the first row I do not get this error.  I also have a change button on the row and if I change the row via that button that it works in all instances.

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Record not found error (version 4.31 PR 19)
« Reply #1 on: November 24, 2008, 11:02:32 PM »
Hi John,

Is this happen on all browses or just this one?
If just this one, then can you spot anything different about this one?
Is the "Unique Unchanging Key" for this table any different to other keys? eg more than 1 component? Or a different field type?

Cheers
Bruce

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #2 on: November 25, 2008, 05:21:09 AM »
Hi Bruce,

This one is a real mystery and I spent the better part of yesterday going over everything and trying to find a work around but it still is not working.  I have another browse in this app (a child file of the order header) and the problem does not happen there.  The 'Unique Unchaning Key' is the primary ID for the table and is no different from other primary keys.  It consists of 1 component, the data type is a long (and an identity field on the back end).  I did not have this problem in 4.30.

As I said, I spent a lot of time on this yesterday without success.  It is odd that the row change button (and I added a hyperlink on the order number and that works) works correctly and if I select a row other than the one the browse opens on it works.  If you want (and have time), you can connect to my machine to take a look (I can send an invitation).

Is there any place in the procedure that tells us when a row is selected?  I tried the CallClicked routine but it only seems to be called if the '_Clicked' value exists (I'm not sure what that means).

Thanks,

John

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #3 on: November 25, 2008, 05:49:24 AM »
Hi Bruce,

Another 'odd' thing I am noticing is with a conditional delete button on this browse.  The delete button should only be available on this condition: OrdHeader:Status = 1 but what I am seeing is that the delete button is not removed unless the last order in the browse has a status other than 1.  My expectation is that the delete button should be hidden when clicking on any row with a status other than 1 and be unhidden when clicking on a row with a status of 1.  Perhaps this is not even possible but, if not, how should this option work?  I also have delete button on the row but if I make that conditional, the print button to the right of it moves into the delete column when the status is ~= 1.

John

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #4 on: November 25, 2008, 06:07:09 AM »
Hi Bruce, Please disregard my last message about the delete button.  I unchecked the Delete button option on the Form tab but left the condition and this removes the form delete button but leaves the delete button column in the browse.  If the status ~= 1 it removes/hides the row button but does not shift over the print button beside it.  So all is okay now for conditional deleting.  Still have that nagging record not found error, though.

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #5 on: November 25, 2008, 07:05:26 AM »
Hi Bruce,

I am rebuilding my 'problem' OrderBrowse procedure step by step and so far it is working correctly.  At some point I will either hit the problem or complete all of my changes without the problem resurfacing (my hope).  I'll let you know how it goes.

John

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #6 on: November 25, 2008, 07:39:56 AM »
Hi Bruce,

Believe it or not but I have pinpointed the problem.  I have add an XHMTL entry in the browse.  The routine name is:

AfterSubheading

The condition is:

bOrders = False

The location is:

After Sub-Heading

and the XHMTL is:

<table width=100%>
  <tr>
    <td>
       <br />
       <br />
      <p class="MyMessageBox" style="Width: 85%;">
      Press one of the 'Add Order' Buttons below to create an order!
      <p />
    </td>
  </tr>
</table>

when this is in place I get the record not found error.  When I remove it, all is okay.  Basically the message in the XHMTL is displayed when there are no open, submitted or processing orders.  Otherwise the message is not displayed.

So now to figure out why this is causing the problem.

John

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #7 on: November 25, 2008, 08:02:14 AM »
Hi Bruce,

When then XHTML entry is in place in the NetWebBrowse procedure this code is generated:

    do SendPacket
  If (bOrders = False)
    Do AfterSubheading
    do SendPacket
  End

If I comment out the first do SendPacket the XHTML routine processes correctly and I no longer get the Record Not Found error. 

When the XHTML entry is deleted the code snippet above is completely removed ... that is, there is no call to the Send Packet routine at this point in the code and all works well (without my message box of course).  So it seems as if there is an extra call to the SendPack routine that should not be there.

John

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Record not found error (version 4.31 PR 19)
« Reply #8 on: November 25, 2008, 08:03:48 AM »
Hi John,

well, for starters this isn't valid xHTML - so I'm not sure if this is causing your problem or not, but it 'aint gonna help.

specifically;
    <p class="MyMessageBox" style="Width: 85%;">
      Press one of the 'Add Order' Buttons below to create an order!
      <p />
should be
    <p class="MyMessageBox" style="Width: 85%;">
      Press one of the 'Add Order' Buttons below to create an order!
      </p>

Cheers
Bruce

jtdunn

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: Record not found error (version 4.31 PR 19)
« Reply #9 on: November 25, 2008, 09:01:09 AM »
Hi Bruce,

Whoops, that is a typo (and not in the actual code).  Regardless, calling the XHTML is conditional (so the Record Not Found error occurs regardless if the XHTML is sent or not).  I found that the problem is fixed by removing what seems to be an extra call to the SendPacket routine.

Thanks,

John