FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
||||
|
||||
Proceso muy largo ?
Hola amigos del foro, necesito nuevamente su ayuda sucede que trabajo con tablas PARADOX y tengo que trabajar con tablas del sistema , es decir pequeños modulos que utilicen esas tablas tengo un proceso el cual toma tiempo
//SQLCodigoclie2='Select cclie from clie01 where Substring(cclie from 1 for 1) between '+ chr(39)+'a'+chr(39)+ ' and '+ chr(39)+'z'+ chr(39)+' Order by cclie asc'; Tengo cerca de 13000 registro de esta consulta, lueo realizo un bucle para barrer el Recorset pongo 800, solo para ver el tiempo , cosa que en realida no debe ir solo es para efectos de prueba Código:
SQLquerytmp:=ObtenerSQL(SQLCodigoclie2); indice:=0; while not SQLquerytmp.Eof and (indice<=800)do begin Codigoclie:=SQLquerytmp.Fields[0].asstring; SQLquery:=ObtenerSQL(SQLFindKardexclieS1+chr(39)+Codigoclie+chr(39)); if SQLquery.RecordCount>0 then // Tiene movimientos begin Saldo1:=RoundTo(SQLquery.fields[0].asfloat,-2); Sqlquery.SQL.Clear; Sqlquery.Close; SQLquery:=ObtenerSQL(SQLFindKardexclieS2+chr(39)+Codigoclie+chr(39)); Saldo2:=RoundTo(SQLquery.fields[0].asfloat,-2); if Saldo1=Saldo2 then // No tiene saldo if saldo1<=350 then // Saldo menor o igual a 350 soles begin EjecutarSQL(SQLUpdateClienteKard,'JA078',Codigoclie); // Actualizo Kardex de Cliente SQLquery:=ObtenerSQL(SQLFindClienteMovInv+chr(39)+Codigoclie+chr(39)); // Verificar si el cliente tiene Movimientos if SQLquery.RecordCount>0 then EjecutarSQL(SQLUpdateClienteMovInv,'JA078',Codigoclie); // Actualizo Movimientos de Cliente EjecutarSQL(SQLUpdateClienteFact,'JA078',Codigoclie); // Actualizo Facturas de Cliente EjecutarSQL(SQLDeleteClie,Codigoclie);} end; end else EjecutarSQL(SQLDeleteClie,Codigoclie); // Borra al cliente de la tabla CLIE01 Sqlquery.Close; SQLquerytmp.Next; inc(indice); gbar.Progress:=gbar.Progress+1; end; Sqlquery:=nil; SQLquerytmp.Close; SQLquerytmp:=nil; end; LOCK FILR HAS GROWN TOO LARGE A que se puede deber esto , ya que en realidad el recorrido total esta mas o menos 13000 veces Espero sus comentarios. Última edición por Coco_jac fecha: 21-12-2005 a las 20:28:53. |
#2
|
||||
|
||||
Leete esto:
Cita:
__________________
Guía de Estilo de los Foros Cita:
|
#3
|
||||
|
||||
Hola marcos gracias por responder, me podrias explicar un poco el ultimo punto no me queda claro
gracias. |
#4
|
||||
|
||||
Cita:
Pues lo que dice es que configures Local Share a False, sino compartes las tablas entre diferentes aplicaciones. Un ejemplo creas en Delphi con Tablas Paradox un programa de facturación, otro de contabilidad y otro de nóminas, por ejemplo la tabla clientes es la misma para facturación y contabilidad, por lo tanto si se abre la contabilidad y la facturación a la vez, cosa más que probable, estariamos compartiendo dicha tabla a parte de otras entre 2 aplicaciones distintas, en este caso si habría que configurar Local Share a True. Un Saludo.
__________________
Guía de Estilo de los Foros Cita:
|
#5
|
||||
|
||||
Hola nuevamente Marcos, estuve leyendo con detenimiento y me quedo mas claro pero tengo una inquietud, te explico, la causa de mi problema es el punto 2 :
Delphi: Hay una componente TTable abierta asociada a una tabla sobre la cual se realizan múltiples consultas SQL mediante una componente TQuery. pero mi aplicacion correra en cada maquina, y no desde el servidor donde si estan alojadas mi tablas, como solucionaria esto, ya que se especifica que debo crear las carpetas y direccionarlas a ellas. |
#6
|
||||
|
||||
La estructura suele ser:
\\Servidor\c:\Programa \\Servidor\C:\Programa\Tablas \\Servidor\C:\programa\Net Configuras el Alias y el NetDir y ya lo tienes. Un Saludo.
__________________
Guía de Estilo de los Foros Cita:
|
|
|
|