DBSort Version 1.0 This procedure makes direct calls to the BDE to sort Paradox databases. SortTable(NumFields : Integer, FieldArray: array[0..255] of Word, OrderArray: array[0..255] of Byte, InputFile : string, OutputFile: string, Alias : string, RemoveDup : boolean); NumFields : The number of fields to sort by FieldArray: Which fields to sort by OrderArray: Per field, ascending (0) or descending (1) InputFile : Paradox table to be sorted OutputFile: Result (registered version only for keyed tables) Alias : Paradox database RemoveDup : Remove duplicate records or not Ex: SortTable(2,FieldArray,OrderArray,'INPUT.DB',nil,'TEST',FALSE); Open SORTDEMO.DPR to see the example. You must have an Alias "TEST" pointing to the SORTDEMO directory, or change the example program. If you use this unit in a program for more than 14 days, please register. When you register, you will receive an upgrade that allows you to sort keyed tables and output the results to another table. I will also send you the source code for the DBSort unit. To Register, send $20 to: DB Sort Unit Care of: Brian Becker 7106 Buckner Tarsney Rd. Grain Valley, MO 64029 Make checks payable to Brian Becker. No warranties expressed or implied. Use at your own risk.