Ver Mensaje Individual
  #6  
Antiguo 04-11-2022
giantonti1801 giantonti1801 is offline
Miembro
 
Registrado: oct 2022
Posts: 143
Reputación: 2
giantonti1801 Va por buen camino
Cita:
Empezado por duilioisola Ver Mensaje
Deberías mencionar el texto del error, pero yo apostaría a que te dice que el SQL no está bien formado.

Código Delphi [-]
Begin
   ADOQueryUpdate.Open;
   // Primero borro lo que hubiera, ya que la segunda vez se agregará otra línea al SQL
   ADOQueryUpdate.SQL.Clear;
   ADOQueryUpdate.SQL.ADD('update tiket set Estatus = :Estatus,Usuario= :Usuario WHERE Item = :Item');
...

También supongo que para poder modificar el SQL deberías tener el ADOQuery Cerrado (haciendo ADOQueryUpdate.Close).
gracias, pero en que momento o parte del codigo los cierro con ADOQueryUpdate.Close porque creeme no se si sera esto pero me sigue dando error.

Código Delphi [-]
ADOQueryUpdate.Open;
            ADOQueryUpdate.SQL.Clear;
            ADOQueryUpdate.SQL.ADD('update tiket set Estatus = :Estatus,Usuario= :Usuario WHERE Item = :Item');
            ADOQueryUpdate.Parameters.ParamByName ('Estatus').Value := 'OLD';
            ADOQueryUpdate.Parameters.ParamByName ('Usuario').value := Label4.Caption;
            ADOQueryUpdate.Parameters.ParamByName ('Item').value := Label3.Caption;
            ADOQueryUpdate.ExecSQL;

Última edición por giantonti1801 fecha: 29-03-2023 a las 20:43:36.
Responder Con Cita