Eu tambem fiz um erro de digitacao.  Eu queria dizer fieldbyname!

-----Original Message-----
From: delphi-br@yahoogrupos.com.br
[mailto:delphi...@yahoogrupos.com.br]on Behalf Of Wilson, Stephen
Sent: 21 December 2009 08:27
To: delphi-br@yahoogrupos.com.br
Subject: RE: [delphi-br] Ajuda abrir formulario com duplo click no
DbGrib.


Ola senhor

Voce perdeu um 'e' in fieldbynamwe

dados.AdPacientes.Locate('Codigo','AdLocPaciente.fildbyname("codigo").asstring',[lopartialkey]);



Steve 

-----Original Message-----
From: delphi-br@yahoogrupos.com.br
[mailto:delphi...@yahoogrupos.com.br]on Behalf Of dssmoura
Sent: 19 December 2009 11:44
To: delphi-br@yahoogrupos.com.br
Subject: [delphi-br] Ajuda abrir formulario com duplo click no DbGrib.


  Bom dia senhores.


  Tenho um formulario(localizar pacientes) de busca onde e chamado dentro de um 
outro formulario (pacientes)(estou usando bd access, adodataset para conexão no 
banco), no formulario de busca coloquei um edit, um sppedbutton e um dbgrid, 
coloquei no código do botão :

procedure TFrmLocPaciente.Button1Click(Sender: TObject);
begin
   Qlocpaciente.Close;
   QlocPaciente.Parameters.ParamValues['pac']:=edtconsulta.Text + '%';
   QlocPaciente.Open;  
end;

no evento onDbClick do dbgrid:

procedure TFrmLocPaciente.DBGrid1DblClick(Sender: TObject);
begin
dados.AdPacientes.Locate('Codigo','AdLocPaciente.fildbyname("codigo").asstring',[lopartialkey]);
end;
 
quando da o duplo click esta dando o seguinte erro:

"Project Sistema.exe raised exception class EoleException with message 'Os 
argumentos são incorretos, estão fora do intervalo aceitável ou estão em 
conflitos'.Process stopped. Use Step or run to continue."

Ai eu pergunto o que estou fazendo de errado, ou e outro codigo que tenho que 
usar?

Desde já Agredeço a atenção de voces, obrigado e até mais



------------------------------------

-- 
<<<<< 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.

  ** Please consider the environment before printing this email. **

***************************************************************************



------------------------------------

-- 
<<<<< 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.

  ** Please consider the environment before printing this email. **

***************************************************************************

Responder a