Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Populating List Box from Table
Message
From
24/10/2001 05:45:24
 
 
To
24/10/2001 04:54:59
Ashish Patel
Hindustan Petroleum
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00572474
Message ID:
00572477
Views:
22
Ashish,

The first and easiest thing for you to do is put an index on the table
add an index on natur_code

Next.. if you are displaying 25000 (or even 5000) records in a listbox then you need to change your strategy, listboxes are not really designed for this kind of thing you shuold think about using a grid.

You could use a SQL Select statement as your recordsource for the listbox (or grid)
Select cons_no, name from consumer where natur_code = "4" and !empty(ctaout_dt) and !empty(tvout_dt) into cursor consList
HTH

Will

>I am having a form on which one of the text box is to capture consumer No. If the user doesn't know the consumer No, next to text box I have provided one button (help button). When user clicks on that button then one list box will be displayed with consumer No and Name. So that when user clicks on any no the consumer no text box will get populated with that consumer no. It is working fine. But it is too slow. Because I am not picking the consumers records as it is. In the Load event where I am using the consumer file I am using the command set filt to natur_code = "4" and not empty(ctaout_dt) and not empty(tvout_dt)
>and in the list box I have given the recordsource = consumer.cons_no,name.
>
>When my form starts it takes nearly 15 seconds to display the form. I am having nearly 25000 records in consumer master and also dbf is having nearly 40 fields. I ma using free tables.
>
>Can I expidite this ?
>
>
>Pl. Help.
>
>Thanks in Advance.
>
>Ashish Patel
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform