How Do you put a database into an array then sort it by one of the fields names?
Why don't you just create an index on the database using the field(s) you want sorted as the key?
Why don't you just do "order by column_name" in your query and have your sql server sort it for you =)
-andy