Erro: There is no overloaded version of + that can be called with these arguments.

Delphi

09/02/2011

Caros,

Gera esse erro no código abaixo:
Help-me plizi.

[Pascal Error] ADQMeuForm01.pas(217): E2250 There is no overloaded version of 'MinhaFuncaoSQL' that can be called with these arguments


procedure TFormMeuForm.edtCODIGOExit(Sender: TObject);
begin
  if ((Sender as TDBEdit).Text <> '') and (DmForm.cdsRelat.State in [dsInsert, dsEdit]) and
    (not MinhaFUncaoSQL('VRTRAN', ['CODIGO','NOME'],
    [StrToInt((Sender as TDBEdit).Text)], Resultados)) then
  begin
    DmForm.cdsRelat.FieldByName('NOME_' + (Sender as TDBEdit).Name).AsString := '';
    MessageDlg('Código não localizado !!!', mtInformation, [mbOK], 0);
    (Sender as TDBEdit).SetFocus;
    Exit;
  end
  else if ((Sender as TDBEdit).Text <> '') and (DmForm.cdsRelat.State in [dsInsert, dsEdit]) then
    DmForm.cdsRelat.FieldByName('NOME_' + (Sender as TDBEdit).Name).AsString := Resultados[1];
end;


Elton ésqui

Elton ésqui

Curtidas 0

Respostas

Alan Souza

Alan Souza

09/02/2011

as variáveis que vc está passando para a função MinhaFuncaoSQL não condizem com a declaração na função:
Exemplo:

function funcao(variavel: Integer): Boolean;

if funcao('String') then...

verifique se os dados passados são exatamente do mesmo tipo da declaração.
GOSTEI 0
Elton ésqui

Elton ésqui

09/02/2011

Beleza

Faltava declarar o DMForm.TSQLConnection

Valeu
GOSTEI 0
POSTAR