Estoy usando el componente IBSQL y quiero hacer un insert usando una variable de tipo entero, pero me arroja error.
Código Delphi
[-]
Var
Total: Integer;
Begin
Total:= 435;
with Consulta do
begin
SQL.Clear;
SQL.Add( 'INSERT INTO CLIENTES' );
SQL.Add( '( NOMBRE, NIF, IMPORTEPTE )' );
SQL.Add( 'VALUES' );
SQL.Add( '( ''ANTONIO GARCIA LOPEZ'', ''46876283D'', Total )' );
Transaction.StartTransaction;
try
ExecQuery;
Transaction.Commit;
except
on E: Exception do
begin
Application.MessageBox( PChar( E.Message ), 'Error de SQL', MB_ICONSTOP );
Transaccion.Rollback;
end;
end;
end;
End;