Browse list highlighted record

I am in the process of converting an application from using a Sybase database to SQL Server database. There is one particular window which uses a browse that i am having issues with. When the screen refreshes the browse would highlight the same record as before the refresh but since I have changed the browse to look at an SQL server table this no longer is the case. I inherited the application a couple of years ago and had not used Clarion prior so I’m really stuck on this one. Could anyone out there give me some pointers?

What is the sort order for the browse?
Make sure it is unique for a given row.

Morning Rick

The key for the browse is definitely unique.

Is there another area place that I should be looking at for a sort order?

Doesn’t appear to be an order statement being used, just the key.

The key fields are used as the order by. You can confirm by profiling the request to the backend.

Thanks Rick.

So the key contains a unique id field from the table so that should be OK?

In the Sybase version there was an index against the database table to match the one that the browse uses. This isn’t currently present in the SQL server database.

Would this cause the issues I am seeing or would this only have an effect on speed?

Cheers

Marc Brierley

Trimble Forestry Logistics

1372 Hinemoa St, Rotorua, 3010 | New Zealand
+64 73480308 Direct

+64 212855568 Mobile
+64 73480306 Fax
[email protected]

Please consider the environment before printing this email.

Notice: This e-mail together with any attachments is confidential, may be subject to legal privilege and may contain proprietary information, including information protected by copyright. If you are not the intended recipient, please do not copy, use or disclose this e-mail; please notify us immediately by return e-mail and then delete this e-mail.

No, there isn’t a need for a matching index on the backend for filtering or ordering. Of course, it can possibility help performance but that isn’t the problem you’re having.

Hi Rick
Would you have any other suggestions on how to deal with my problem?

Hi Marc,
What are the key fields and what are their data types?
Can you show us the table definition?
Standard Browse/Form? ABC or Legacy?

Hi Rick

It’s a browse list box on an ABC template.

I have attached a text file containing the table definition.

The browse uses the key ‘kDateStartDateStartTimeTruckCodeJourneyNumber’ which is in the text file.

The issue: Some buttons on the window execute stored procedures on the database which change fields for the record which is highlighted in the browse. The window is then reset to reload the browse so that the changes are displayed.

The highlighted record should still be highlighted after the reset (as when it was on Sybase) but it is jumping to the last record in the browse (now that it’s using SQL).

I don’t think I’ve changed anything majorly with how the window works.

I have updated the syntax in the PROP:SQL filter and when executing stored procedures bu that’s about it.

Any suggestions would be appreciated.

Cheers

Marc Brierley

Trimble Forestry Logistics

1372 Hinemoa St, Rotorua, 3010 | New Zealand
+64 73480308 Direct

+64 212855568 Mobile
+64 73480306 Fax
[email protected]

Please consider the environment before printing this email.

Notice: This e-mail together with any attachments is confidential, may be subject to legal privilege and may contain proprietary information, including information protected by copyright. If you are not the intended recipient, please do not copy, use or disclose this e-mail; please notify us immediately by return e-mail and then delete this e-mail.

(Attachment Table definition.txt is missing)Table definition.txa (4.8 KB)