PDA

Click to See Complete Forum and Search --> : Whats your opinion? Call or sort.


Jun 5th, 2000, 02:26 AM
I have an app that gets data from a table and places it into a UDT. One member of the UDT is placed in a combo box for the user to choose from. The rest of the UDT members will then be displayed on a form. The problem is that the combo box sorts the one UDT member and then I lose contact with the rest of the members because the listindex value does not correspond with the UDT index or subscript value. I am thinking of two possible solutions: 1) Sort the UDT before a member is sent to the combo box (the sort would be done on the member that is sent). 2) Make a separate call to the data after the user has selected from the combo box.

My question is, which way would be better, safer and faster. The number of records in the database could be in the thousands. If it is the sort, where can I find a good code example of a sort to study.

If you have another suggestion, feel free to share it. I am using VB 6 with SP3.

JHausmann
Jun 5th, 2000, 05:42 AM
Use an "order by" clause in your select statement.

Jun 5th, 2000, 07:53 PM
Thought of that, but we need to use a spercific object created to get the data from a specific programs database and we only have available the methods of this object. Bottom line, NO standard SQL statements are available. This object is used to ensure that financial data is not corrupted.

JHausmann
Jun 6th, 2000, 03:27 AM
Sort before loading into the combo box. I'll see if I can find my VB bubble sort code....