How to create an array within a Class

I have a class called “OrdersShipped” which is use to hold data which will subsequently be loaded into a SQLite Database.
The following code is used to get the data from a MySql Database to the Class. The code works OK to get the data, however the data gets sorted by date in a listbox which reorders my data. How do I create an array within the Class to keep my data in the proper order?

Dim CustOrders() As OrdersShipped

Dim rsOrders As RecordSet
rsOrders = MySqlDB.SQLSelect(sql)

Dim Ord As OrderShipped
Ord = New OrderShipped

If rsOrders <> Nil Then
While Not rsOrders.EOF
Ord.OrderDate = rsOrders.Field(“orders_date”)
Ord.CustomerID = rsOrders.Field(“customers_id”)
Ord.BillToName = rsOrders.Field(“billing_name”)
Ord.BillToCompany = rsOrders.Field(“billing_company”)
Ord.BillToAddress1 = rsOrders.Field(“billing_street_address1”)
Ord.BillToAddress2 = rsOrders.Field(“billing_street_address2”)


End If

my question is… WHY is the listbox changing the order?
or is it more accurate to say the SQL is returning the data in an “ORDER BY” situation (since you didn’t detail that statement)

And I “DO SO HOPE”, you have read all the other database related topics concerning storing/sorting dates… USE SQLDATE(time) format always

Creating an array property inside a class is the same as creating anyother property… but I suggest that this is the incorrect way to solve your issue.

remember … unless an ORDER BY is specified, the “order” in which records are returned IS NOT (repeat NOT) guaranteed to be the same as the order in which they were inserted.