Ver Mensaje Individual
  #1  
Antiguo 30-11-2011
JairoC JairoC is offline
Miembro
NULL
 
Registrado: oct 2011
Posts: 45
Reputación: 0
JairoC Va por buen camino
No se puede convertir variable de tipo null a tipo integer.

Hola!!! Tengo un problemita... Estoy haciendo un cierre z... Estoy en la parte que tengo que seleccionar el primer y ultimo numero de cada factura... Para eso uso un Query, al que le agredo los fields mediante codigo... y me sale ese error.. Les muestro el codigo:
with(dm.IBQuery_general)do
begin
FieldDefs.Clear;
FieldDefs.Add('MINIMOA', ftInteger, 0, FALSE);
FieldDefs.Add('MAXIMOA', ftCurrency, 0, FALSE);
SQL.Clear;
SQL.Add('SELECT MIN(NUMERO) AS MINIMOA, MAX(NUMERO) AS MAXIMOA from facturas_de_Ventas where TIPO_FACTURA =:"A" and id_cierrez is null ');
Open;
if not IsEmpty then
begin
PRIMEROA:=FieldValues['MINIMOA']; // ACA SALE EL ERROR
Responder Con Cita