PDA

Click to See Complete Forum and Search --> : SQL and VB


skooby
Oct 5th, 2000, 03:56 PM
I am fairly new to VB and SQL....I am wanting to sort data in a data grid (bound to ADO control) by various columns ( i.e. like in MS Access....Rt. Click on column)

First is it possible to set up the Data Grid to do this and how?

If now how can I use SQL to Sort the columns?

Thanks

barrk
Oct 5th, 2000, 04:17 PM
The easy way is to specify the column order and column name in your SQL statement:

"Select tp as [Test Point], groupnum as [Group Number], mantype as Manuever from mytable"

This will put them into the grid in the order selected.