Hola!!
En el dataset editor (IBDataSet) tengo esta sentencia para DeleteSQL:
Código Delphi
[-]
delete from DATOS
where
CONSECUTIVO = :OLD_CONSECUTIVO
Pero en lo real quiero hacer esto:
Código Delphi
[-]
procedure TdmDatos.BorrarDatos(indice: integer);
begin
with dstDatos do
begin
DeleteSQL.Clear;
if (indice < 4) then
begin
DeleteSQL.Text := 'DELETE FROM Datos WHERE Bascula = :Borrar';
ParamByName('Borrar').Value := indice;
end
else
DeleteSQL.text := 'DELETE FROM Datos' ;
ExecSQL;
end;
end;
Me da un mensaje de Horror que dice:
Cita:
---------------------------
Debugger Exception Notification
---------------------------
Project Captura.exe raised exception class EIBClientError with message 'Field "Borrar" not found'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
|
Es decir que no encuentra el campo "Borrar" y se supone que estoy pasando un parametro llamado "Borrar".
¿Que estoy haciendo mal?