Club Delphi  
    Paypal   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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 16-01-2015
aposi aposi is offline
Miembro
 
Registrado: dic 2006
Posts: 159
Poder: 20
aposi Va por buen camino
Prueba este codigo.
He quitado el recorrer las lineas del memo, ja que para insertar no es necesario, con el
Memo1.Lines.Add inserta la linea al final.

Tienes un while de la consulta insert que no pinta nada, solo cargas el sql pasas los parametros y ejecutas el insert

Código Delphi [-]
var
I: Integer;
A,B:String;
Fecha:String;
TT,Cad,Cad1,Cad2:String;

Cuenta,Cuenta2,NumeroCuenta:String;
Cedula:String;
Monto:String;
Nombre:String;

C,D,E,F,G:String;

begin
    TT:=memo1.Lines[1];

    A:='HGOBERNACIÓN ESTADO CARABOBO             01020388170000019651';
    Cad:=cad+StringOfChar(' ',2);              // Campo de numero de control de Archivo
    Fecha:=DateToSTR (DateTimePicker1.Date);
    Cad1:='00000';
    Cad2:=cad2+StringOfChar(' ',8);            // Monto total de la nomina
    B:='03291 ';
    Memo1.Lines.Add(A+Cad+Fecha+Cad1+Cad2+B);


   { Dmodulo.ASISTENCIA_COBRAR.SQL.Clear ;
    Dmodulo.ASISTENCIA_COBRAR.SQL.Add('select * from ASISTENCIA_COBRAR ');
    DMODULO.ASISTENCIA_COBRAR.Open; }
    Dmodulo.ASISTENCIA_COBRAR.First;
       while not Dmodulo.ASISTENCIA_COBRAR.Eof do
             begin

                 if DMODULO.ASISTENCIA_COBRAR.FieldByName('NumeroCuenta').AsString>'' then

                 begin
                     

                         Cuenta:=        DMODULO.ASISTENCIA_COBRAR.FieldByName('Cuenta').AsString;
                         NumeroCuenta:=  DMODULO.ASISTENCIA_COBRAR.FieldByName('NumeroCuenta').AsString;
                         C:='0000';
                         Monto:=         DMODULO.ASISTENCIA_COBRAR.FieldByName('Monto').AsString;
                         Cuenta2:=       DMODULO.ASISTENCIA_COBRAR.FieldByName('CuentaII').AsString;
                         Nombre:=        DMODULO.ASISTENCIA_COBRAR.FieldByName('Nombre').AsString;
                         E:=StringOfChar(' ',26);
                         F:='00';
                         Cedula:=        DMODULO.ASISTENCIA_COBRAR.FieldByName('Cedula').AsString;
                         G:='003291  ';
                                                                                   //+Cedula+G

                         Memo1.Lines.Add(Cuenta+NumeroCuenta+C+Monto+C+Cuenta2+Nombre+E+F+Cedula+G);

                         

                 end
                 else
                 begin
                     Dmodulo.En_Espera.Close;
                     Dmodulo.En_Espera.SelectSQL.Text:=Dmodulo.En_Espera.InsertSQL.Text;

                    
                    

                     Dmodulo.En_Espera.ParamByName('CEDULA').AsString:=DMODULO.ASISTENCIA_COBRAR.FieldByName('Cedula').As  String;
                     Dmodulo.En_Espera.ParamByName('TIPO_DOCUMENTO').AsString:=DMODULO.ASISTENCIA_COBRAR.FieldByName('TIP  O_DOCUMENTO').AsString;
                     Dmodulo.En_Espera.ParamByName('NOMBRE').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('Nombre').AsStr  ing;
                     Dmodulo.En_Espera.ParamByName('APELLIDO').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('APELLIDO').A  sString;
                     Dmodulo.En_Espera.ParamByName('TLF_FIJO').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('TLF_FIJO').A  sString;
                     Dmodulo.En_Espera.ParamByName('TLF_CELULAR').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('TLF_CELUL  AR').AsString;
                     Dmodulo.En_Espera.ParamByName('CORREO').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('CORREO').AsStr  ing;
                     Dmodulo.En_Espera.ParamByName('MUNICIPIO').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('MUNICIPIO')  .AsString;
                     Dmodulo.En_Espera.ParamByName('PARROQUIA').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('PARROQUIA')  .AsString;
                     Dmodulo.En_Espera.ParamByName('DIAS_TRABAJADO').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('DIAS_T  RABAJADO').AsString;

                     Dmodulo.En_Espera.ParamByName('Monto').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('Monto').AsStrin  g;

                     Dmodulo.En_Espera.ParamByName('Semana').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('Semana').AsStr  ing;
                     Dmodulo.En_Espera.ParamByName('Cuenta').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('Cuenta').AsStr  ing;
                     Dmodulo.En_Espera.ParamByName('CuentaII').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('CuentaII').A  sString;
                     Dmodulo.En_Espera.ParamByName('NumeroCuenta').Value:=DMODULO.ASISTENCIA_COBRAR.FieldByName('NumeroCu  enta').AsString;

                     Dmodulo.En_Espera.ExecSQL;
                     Dmodulo.ibt.Commit;
                    
                     SHOWMESSAGE('A sido Insertado');
                     

                 end;
                 Dmodulo.ASISTENCIA_COBRAR.Next;
             end; 
end;

Última edición por aposi fecha: 16-01-2015 a las 17:24:48.
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
Otra via de pago para ser premium enecumene La Taberna 11 11-01-2008 00:34:49
Insertar ciertos datos de Otra tabla dentro de Un Store (Fechas de Pago ) IcebergDelphi Firebird e Interbase 2 16-09-2007 14:49:50
Imprimir una seleccion de datos Marymania Impresión 6 28-11-2006 17:37:19
De Paradox a Firebird (Emilio, yo pago una ronda para todos) Paoti La Taberna 9 13-10-2006 19:49:20
seleccion de base de datos sebas Conexión con bases de datos 2 12-07-2003 22:52:59


La franja horaria es GMT +2. Ahora son las 22:09:09.


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