Problemas com função
pessoal estou usando uma store procedure para inserir no meu banco a data que a pessoa digita no maskedit. mas está acontecendo um erro e não estou conseguindo identificar. Se al´guém puder me ajudar;
Minha função é assim:
function TForm1.verifica_data(pdata: integer):
begin
result := -1;
with IBStoredProc1 do begin
close;
parambyname(´p_dt´).AsInteger :=pdata;
try execproc; except exit ;end;
result := paramByName(´p_cod_teste´).AsInteger;
end;
end;
Minha função é assim:
function TForm1.verifica_data(pdata: integer):
begin
result := -1;
with IBStoredProc1 do begin
close;
parambyname(´p_dt´).AsInteger :=pdata;
try execproc; except exit ;end;
result := paramByName(´p_cod_teste´).AsInteger;
end;
end;
Mineiro
Curtidas 0
Respostas
Fred
01/09/2003
´Data <> Inteiro´ data = Date ou DateTime
function TForm1.verifica_data(pdata: Date): //ou DateTime ou TDate
begin
result := -1;
with IBStoredProc1 do begin
close;
parambyname(´p_dt´).AsDate :=pdata;
try execproc; except exit ;end;
result := paramByName(´p_cod_teste´).AsInteger;
end;
end; 8)
function TForm1.verifica_data(pdata: Date): //ou DateTime ou TDate
begin
result := -1;
with IBStoredProc1 do begin
close;
parambyname(´p_dt´).AsDate :=pdata;
try execproc; except exit ;end;
result := paramByName(´p_cod_teste´).AsInteger;
end;
end; 8)
GOSTEI 0