Ver Mensaje Individual
  #1  
Antiguo 14-11-2017
Avatar de The Cid James
The Cid James The Cid James is offline
Miembro
NULL
 
Registrado: jun 2013
Posts: 129
Reputación: 11
The Cid James Va por buen camino
could not convert variant of type (null) into type (string)

Bueno como me dice el error la variable no puede ser convertida si es null aca les dejo el codigo, estoy tratando de usar un TEdit y convertirlo a integer (que es el valor que la tabla guarda en ese campo)

Código Delphi [-]
procedure Tfcantidad.BCokClick(Sender: TObject);
var
a: integer;
begin
  a := StrToInt(Ecantidad.Text); // no se supone que aca le estoy dando un valor a la variable 
  if (strtoint(Ecantidad.Text)<=0)
    then
      begin
        Application.MessageBox('El valor ingresado debe ser mayor a O', 'Drugstore',mb_yesno+mb_iconquestion);
      end
  else
    a := fmodulo.tVentadetalle ['cantidad'];
    fmodulo.tVentadetalle ['id_producto'] := fmodulo.tProductos ['id_producto'];
    fmodulo.tVentadetalle['Precio_v'] := ( a * fmodulo.tProductos ['precio_vent']) ;

end;
__________________
We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world.
Responder Con Cita