|
-
Jun 5th, 2000, 02:26 AM
#1
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.
-
Jun 5th, 2000, 05:42 AM
#2
Frenzied Member
Use an "order by" clause in your select statement.
-
Jun 5th, 2000, 07:53 PM
#3
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.
-
Jun 6th, 2000, 03:27 AM
#4
Frenzied Member
Sort before loading into the combo box. I'll see if I can find my VB bubble sort code....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|