NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Jane on September 07, 2021, 01:39:02 PM

Title: SQL browse problem
Post by: Jane on September 07, 2021, 01:39:02 PM
Hi, Bruce,

I'm going to see if you can help me with this in this week's NT webinar.

I've been converting an app from 11.x to 12.25.  I've resolved most of the issues but still have one that's flummoxing me.

Some of the sort headers I've customized, others are just the field value.  They all work fine in the 11.x app. 

But with the 12.25 version, I click on a header and it sorts correctly.  But then clicking the Next button gives a "no records" message and an empty browse.

Attached is a wizarded app that illustrates the problem.  There's also a script to create a test MSSQL database and table with data for the test app.

Looking forward to Thursday  :D

Cheers,

Jane
Title: Re: SQL browse problem
Post by: GordonF on September 07, 2021, 10:29:30 PM
Hi Jane,

I'm not sure if this helps but I had this problem with a SQL browse that I used as a lookup, in my case the problem was that I'd specified an order in the calling field and also correctly in the actual lookup. It was an error on my part but it caused the next button to show no record, removing the order from the lookup calling field resolved the issue.

I hope this helps.

Gordon
Title: Re: SQL browse problem
Post by: osquiabro on September 08, 2021, 05:01:42 AM
Hi Jane, it worked perfect for me in NT 12.23 and NT 12.25
Title: Re: SQL browse problem
Post by: Jane on September 08, 2021, 07:14:00 AM
Hi Jane, it worked perfect for me in NT 12.23 and NT 12.25
Well... why does it love you and hate me ??

 ???
Title: Re: SQL browse problem
Post by: osquiabro on September 09, 2021, 06:38:19 AM
Jane for me work sorting all columns asc and desc, next and previous, what version of clarion you use? i use 11.13630
Title: Re: SQL browse problem
Post by: Jane on September 09, 2021, 06:48:40 AM
I'm using 11.0.13401
Title: Re: SQL browse problem
Post by: Jane on September 09, 2021, 10:09:22 AM
Resolved.  :)
Title: Re: SQL browse problem
Post by: osquiabro on September 09, 2021, 04:25:58 PM
what was the problem?
Title: Re: SQL browse problem
Post by: Jane on September 09, 2021, 05:02:05 PM
Bruce was kind enough to take a look at today's NetTalk webinar.

He found that a call to p_web.RestoreValue is needed to reset loc:vordernumber to the correct value at the beginning of the SetVorder routine in the browse procedures.

Otherwise the browses use the correct sort order when you click the header but then revert to the default loc:vordernumber for subsequent pages and choke and die.

This is a side effect of some of the new stuff he's been building involving the change to using &View for ThisView.

So one line of code in each browse and now they work fine.   :)



Title: Re: SQL browse problem
Post by: GordonF on September 13, 2021, 05:32:24 AM
Hi Bruce,

Is this likely to have been the cause of the problem I mentioned in the first reply to this post, it sounds similar?

Gordon
Title: Re: SQL browse problem
Post by: Bruce on September 13, 2021, 10:09:12 PM
possibly.
Title: Re: SQL browse problem
Post by: Jane on September 14, 2021, 06:47:31 AM
Hi Bruce,

Is this likely to have been the cause of the problem I mentioned in the first reply to this post, it sounds similar?

Gordon

Gordon,

If you want to try the fix Bruce gave me... in browses having the problem search for a line like

Code: [Select]
loc:vordernumber    = p_web.RestoreValue('BrowseHoldingTank_sort_' & loc:RandomBrowseId,net:DontEvaluate)
In 12.25 it is in the GenerateBrowse routine.
(The BROWSENAME_sort_ part of the line will be specific to your browse.  )

Then copy that line exactly and paste it into the first embed in the SetVorder routine.




Title: Re: SQL browse problem
Post by: GordonF on September 15, 2021, 11:51:58 PM
Thanks Jane I'll try that and report back.
Title: Re: SQL browse problem
Post by: Jane on September 22, 2021, 09:36:09 AM
Fixed in 12.26.