Grid Not Updating

Ken

Active Member
I'm working on a custom program originally created by a consultant. I've gotten complaints from the end user that a Grid on one of the rows won't update. The form that doesn't update is a carbon copy of a form that is updating without a problem.
When I run the debug log I can see why the grid isn't updating, the Update line follows:
UPDATE TESTDTA/F59100EX SET EX@FRID=4190.000000,EXSEQ#=1.750000,...(removed for easier reading)... WHERE ( EX@FRID = 4190.000000 AND EXSEQ# = 0.000000 )
The EXSEQ# is always 0.0000 instead of being the actual value of EXSEQ#, in this case 1.750000.
I've regenerated the index, I've regenerated the table. I've created a duplicate form with the same logic (and the same logic as the form that is working correctly). I've made sure that the SQL packages have been rebuilt. And it still fails.
Is there anyway I can debug Edwards logic to see why it's not picking up the correct number? Or has anyone seen this before?
Thanks!
 
Hi Ken

How are you updating the file? If you are doing this through table I/O, I would check the parameters that you are passing in. In general I would run the application through ER-debug and keep an eye on your parameters, EXSEQ# in this case (BC, GC, GB, FC) and ensure that what is passed into the datastructure is correct. Depending on your ER, sometimes BC may be populated, but GC not and vv.

Good Luck,
 
Sef,
I am not updating the file, Edwards is behind the scenes. Or in this case, isn't. The end user is changing the information in the Grid and then pressing OK. The grid permission for Update Mode is Checked, and the options for on the form for 'No update on Grid Business view' is Unchecked.
But it is trying to update, just using the wrong value for the key. How does Edwards determine what the value is for the key?
Thanks,
Ken
 
Is there an FC w/a filter over SEQ#?
Is it one row on the grid, or the entire grid?

Gene
 
Hi Gene,
There are no FC's set up for SEQ#. This is happening on the entire grid.
Could the table itself have a problem? I've regenerated the table, but if the specs are corrupt then the issue would still be there, correct?
Thanks!
 
Hi Ken,
I did NOT notice you followed the advice suggested by (Our Honorable Member) Sef, which was to use the ER Debugger, therefore here I am with some details. You may find the "Debug Application" in menu GH902; it is used to debug either APPL or UBEs ER code.
Warm regards!
PS Exit OMW (and FDA, of course) BEFORE running the ER Debugger.
 
Adrian,
I'm sorry, I have used the Debugger to see what is happening as far as the code that we have created. My problem is, and this is a lack of knowledge on my end, of how to 'see' what Edwards is doing to update the record when I click the 'OK' button. Just to clarify, I am not doing any kind of table I/O in my logic. I'm having Edwards update the Grid.

The only way I've been able to follow this is in the debug log. I feel like I must be missing something here. Since I have no logic in the OK button, I can't put a breakpoint there. All I can do is look at the record after the button has been pressed.

Thanks for everyones input!
 
You're very welcome Ken,
I would look into the Form/Grid Business View, just for a quick check-up.
You may consider attaching the form's code to the next reply, it always helps.
PS There IS a way to add a breakpoint in any codeless ER; you just add a comment, something like "here I am!'
 
Hi Ken

Without being able to closely look at the application, we are only just guessing what the issue is here. So here's another guess:
Is the sequence number a column in the grid and is this column part of the business view? The reason I am asking is because the update command as a result of pressing OK will attempt to assign the GC values to the SQL statement. If a key value (eg Sequence number) is not in the grid AND in the business view, it will substitute <Null> in the SQL for strings and zero for numeric fields.

Are you maybe assigning sequence numbers interactively? Again if you can check the value of BC Sequence No and GC Sequence No just prior to pressing OK, we may be able to find out what's happening.

Rgds,
 
Re: Grid Not Updating (PROBLEM FIXED)

Sef,
Thanks for your input. The problem is fixed because of something you said in your post about assigning Seq#'s interactively.
The Seq# was grabbed from the record and put into a hold variable to be used to increment the number when a new line was added. Looking over the logic and the variables, everything appeared to be ok. I went and looked at a form that was working correctly and noticed that the consultant wasn't using the same data type for the hold variable as was being pulled in from the grid. Once I changed the data type for the hold variable, (in the form that wasn't working), it started to work correctly. Ah but it gets better. I couldn't understand why this would work with a different data type but not the data type that was being pulled from the record. So I went back in and changed the logic back to use the original variable, and it worked with the original variable too!!!
For some reason even though the logic was there to assign the seq# to the hold variable it obviously wasn't working. (Obvious now, that is).
Lesson learned... even though the logic appears to be correct on the screen, go in and "touch" everything again just to make sure that everything 'took'.
Thanks to everyone for their help!
 
Back
Top