AdoServer:OrderBy()

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

AdoServer:OrderBy()

Previous pageReturn to chapter overviewNext page

Purpose

Specify an ORDER BY clause

 

Prototype

METHOD OrderBy ( ) CLASS AdoServer

 

Argument(s)

cOrder1, cOrder2 etc The list of strings comprising the ORDER BY clause. The list will be concatenated, separated by commas.  The strings can contain only contain column names and optional ASC or DESC modifiers. The OrderBy is handled by ADO and no new resultset is retrieved from the provider.

 

Return

LOGICTRUE when succesfull, else FALSE. When Succesfull a Notify(NOTIFYFILECHANGE) is send to the clients

 

The server will send a a NOTIFYFILECHANGE after the operation.

 

Example(s)

strCnn := "Provider=sqloledb;" + ;

  "Data Source=cpserver;Initial Catalog=pubs;User Id=sa;Password=; "

oConn := AdoConnection

// Set the default connection for better error reports

AdoSetConnection(oConn)

oConn:CursorLocation := adUseClient

oConn:Open(strCnn,NIL,NIL,NIL)

oSrv := AdoServer"employee",oConn,adOpenKeySet,NIL,adCmdTable

oSrv:OrderBy("lname asc")

 

 

See Also

AdoServer