Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > SQL
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #3  
Antiguo 18-06-2008
CharlesWar CharlesWar is offline
Registrado
 
Registrado: may 2008
Posts: 5
Poder: 0
CharlesWar Va por buen camino
q_detallefac.First;
while not q_detallefac.Eof do
begin
if (copy(q_detallefac['CVE_ART'],1,2)<>'00') AND (q_detallefac['PREC']>0) and (importe>0) then
begin q_ParFac.sql.Clear;
q_ParFac.SQL.Add ('Select * from PARTIDAS_FAC');
q_parfac.sql.add (' where sucursal=' + QuotedStr(trim(inttostr(num_sucursal))));
q_parfac.sql.add (' and trim(FACTURA)=' + QuotedStr(TRIM(q_cobranza['refer'])));
q_parfac.SQL.add (' and trim(CVE_CONC)=' + QuotedStr(TRIM(q_detallefac['cve_art'])));
q_parfac.SQL.add (' and CANTIDAD=' + QuotedStr(TRIM(inttostr(q_detallefac['cant']))));
q_ParFac.Active:=true;
anticipo:=0;
hay_partida:=0;
if q_parfac.RecordCount>0 then
begin
hay_partida:=1;
if q_parfac['Pagado']<q_parfac['subtotal'] then
anticipo:=q_parfac['pagado'];
end; if (hay_partida=0) or ((hay_partida=1) and (anticipo>0)) then
begin
dias:=q_cobranza['FECHA_APLI']-q_facturas['FECHA_DOC'];
nom_agente:=' '; q_agentes.sql.clear;
q_agentes.sql.add('select * from Vendedores');
q_agentes.sql.add(' where numero=' + quotedstr(trim(num_agente)));
q_agentes.SQL.add(' and sucursal=' + quotedstr(trim(inttostr(num_sucursal))));
q_agentes.Active:=true;
if q_agentes.RecordCount>0 then
nom_agente:=q_agentes['nombre']
else
nom_agente:='NULL'; por lo regular num_agente me dice q valor indefinido cuando al inicio siempre la inicializo al menos con 0
Responder Con Cita
 



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
Error "Invalid field Type" entre Delphi 2007 y Firebird 1.5 saltamirano Varios 2 24-12-2007 23:38:07
Error "Invalid pointer operation" en función contenida en DLL Albano OOP 2 20-06-2007 23:01:31
Acceso a Outlook 2003 Reminders y error "Invalid Variant Operation" saldanaluis Providers 2 24-05-2007 21:17:58
alguien sabe como es esto me tira error en la lineadel where "invalid use of keyword" todook Conexión con bases de datos 5 16-11-2006 21:58:02
Error "Invalid User/Password" al intentar conectar con dbexpress vivim82 Conexión con bases de datos 1 30-04-2004 03:22:49


La franja horaria es GMT +2. Ahora son las 10:58:54.


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