Alastair,
 Load your list box using the Load_From_File...

Don't use the cursor, just do this:

Set Headings Off
Out Listbox.Dat
SELECT DISTINCT Long_Comments +
 FROM All_Comments +
 WHERE Long_Comments NOT CONTAINS 'G:\' +
 ORDER BY Long_Comments ASC
out scr
Property YourListBoxCompID Load_From_File 'Listbox.Dat'


The response will be less than moments...

----- Original Message ----- From: "Alastair Burr" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Monday, February 21, 2011 1:12 PM
Subject: [RBASE-L] - v9.1 on W9/64 - List Box query


I have a (rarely used) form that is a Variable User List List Box with two buttons that now takes approaching 5 minutes to prepare the data when v7.6 took only a few moments.

This is the relevant code that prepares the list:

DECLARE C1 CURSOR FOR SELECT DISTINCT Long_Comments +
 FROM All_Comments +
 WHERE Long_Comments NOT CONTAINS 'G:\' +
 ORDER BY Long_Comments ASC
OPEN C1
FETCH C1 INTO vAddList
WHILE SQLCODE = 0 THEN
 PROPERTY IDLB_CommentsMenu LISTITEMSADD .vAddList
 FETCH C1 INTO vAddList
ENDWHILE

The selection command currently returns 3459 rows when using Browse almost instantly.

I notice, too, that I can no longer use the mouse’s scrolling wheel to move the data up or down – whether a row is selected or not.

Has anything changed that means I need to revamp my code?

Regards,
Alastair.


Reply via email to