Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #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
Poder: 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
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
could not convert variant of type (null) into type (string) davidmedina29 Varios 10 18-02-2016 14:00:56
Could not convert variant of type (olestr) into type (boolean) al ejecutar sp MarinaLR MS SQL Server 1 22-12-2015 17:51:29
Problema: type variant en campo a calcular Nicolas_2011 Varios 9 26-06-2012 18:16:37
Could not convert variant of type (Null) into type (Integer) Alejo15x Varios 2 30-11-2010 18:35:50
Sql que no retorna datos me da error:invalid variant type conversion bezaig SQL 6 17-03-2010 09:58:53


La franja horaria es GMT +2. Ahora son las 15:24:28.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi