Hola a tod@s,
no tengo claro si esta consulta corresponde a este foro o al de bbdd (mysql concretamente), así que si me he equivocado le pido disculpas a los moderadores
utilizo la siguiente función (no hay componentes visuales) con parámetros que devuelve un valor, el tema es que los datos en la tabla son del tipo
bigint y el result también, pero no se cómo pasarle el párametro para ese tipo, utilizo
Int64 :
Código Delphi
[-]
function DimeCentroDiet(VDiet:Int64):Int64;
var
MiQry : TZReadOnlyQuery;
isql : string;
begin
isql := 'select cntroasig from tb02D where cdgo = :cdgotemp';
try
MiQry := TZReadOnlyQuery.Create(nil);
with MiQry do
begin
MiQry.Connection := Data.ZConnectTGS;
MiQry.SQL.Clear;
MiQry.sql.Text := isql;
MiQry.ParamByName('cdgotemp').asint64 := VDiet; MiQry.Open;
if MiQry.RecordCount >0 then begin
Result := MiQry.fields[0].value;
end else begin
Result := 0;
end;
end;
finally
MiQry.Close;
MiQry.Free;
end;
end;
alguien podría indicarme qué estoy haciendo mal ??
Muchas Gracias a tod@s
