Ver Mensaje Individual
  #1  
Antiguo 13-10-2008
[FGarcia] FGarcia is offline
Miembro Premium
 
Registrado: sep 2005
Ubicación: Cordoba, Veracruz, México
Posts: 1.123
Reputación: 22
FGarcia Va por buen camino
Borrar datos con IBX y FB2.0

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?
__________________
ESTO ES UN FORO ... NO UN MÓVIL
¿Por qué no escribir de una manera comprensible para que los humanos lo podamos entender?
Responder Con Cita