amigo com certeza vc esta entrando com um codigo errado, no evento
ontitleclick coloque antes do query.open um showmessagem(query.sql.text) e
analise seu select e vc vera q tem erro..

nao eh viável fazer select toda hora q se quer ordenar uma coluna.. ja
tentou usar Query.SortByField(Field);???


2009/8/17 Wilson, Stephen <stephen.wil...@ipswichhospital.nhs.uk>

>
>
>
> Pode ser assim?
>
> OnTitleClick
> SqlStr = 'SELECT ALGUMA COISA FROM TABELA ';
> sqlStr:= sqlStr + 'ORDER BY ' + Column.FieldName
>
> Espero ter ajudado
>
> Att.
>
> Steve
>
>
> -----Original Message-----
> From: delphi-br@yahoogrupos.com.br <delphi-br%40yahoogrupos.com.br>
> [mailto:delphi-br@yahoogrupos.com.br <delphi-br%40yahoogrupos.com.br>]On
> Behalf Of gugavolcom
> Sent: 15 August 2009 04:29
> To: delphi-br@yahoogrupos.com.br <delphi-br%40yahoogrupos.com.br>
> Subject: [delphi-br] Re: Problemas ao ordenar dbgrid pela coluna
>
> Beleza amigo, já me ajudou muuitíssimo, o problema, é que quando clico mais
> de uma vez por exemplo, ele dá erro, pq com certeza o sql deve ficar da
> seguinte forma: SELECT ALGUMA COISA ORDER BY ALGUMA COISA ORDER BY OUTRA
> COISA, daí dá erro, tô tentando fazer com que o sql do adoquery receba o
> select sem order by pra poder ordenar novamente, se tiver alguma dica,
> agradeço!
>
> Abraço!
>
> ------------------------------------
>
> --
> <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>>
>
> ***************************************************************************
> This e-mail and any files transmitted with it are confidential. If you are
> not the intended recipient, any reading, printing, storage, disclosure,
> copying or any other action taken in respect of this e-mail is prohibited
> and may be unlawful. If you are not the intended recipient, please notify
> the sender immediately by using the reply function and then permanently
> delete what you have received.
> Content of emails received by this Trust will be subject to disclosure
> under the Freedom of Information Act 2000, subject to the specified
> exemptions, including the Data Protection Act 1998 and Caldicott Guardian
> principles.
> This footnote also confirms that, unless otherwise stated, this email
> message has been swept by Sophos Anti-virus for the presence of computer
> viruses.
> ***************************************************************************
>
>  
>



-- 
Leandro, MuTukA


[As partes desta mensagem que não continham texto foram removidas]

Responder a