Jump to content
Sign in to follow this  
Henry Olive

SQLDataset.SortFieldNames

Recommended Posts

I wish everyone a healthy day.
I have a Master-Detail tables (Components : SQLDataset+DSProvider+ClientDataset+D.Source)

2 table's comman field is ID field, Detail Table Primary Keys are ID,LINENO,

In my Detail table i have a SQL Command  *w/o any ORDER BY clause*

But i want to show the detail table's datas in a DBGrid with sorted (ITEMNO)

Even though SQLDataset's  SortFieldNames=ITEMNO but it doesnt sort

How can i show detail table's data in a dbgrid with ITEMNO sorted

**without add CommandText  ORDER BY ITEMNO  clause.**

(P.s : If i add commandtext ORDER BY ITEMNO it works )

Thank You
 

Share this post


Link to post

I solved the problem

I wrote just ITEMNO in the sortfieldname instead of OD.ITEMNO

( SortFieldName requires field name *with Alias* in the CommandText)

Thank You

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×