Ver Mensaje Individual
  #1  
Antiguo 17-01-2006
Avatar de AGAG4
AGAG4 AGAG4 is offline
Miembro
 
Registrado: ago 2004
Ubicación: Los Mochis, Sinaloa, México
Posts: 1.420
Reputación: 21
AGAG4 Va por buen camino
Como Insertar Registro Nuevo ENTRE los demás Registros????

Estoy usando IBX 6.08
Tengo un Maestro Detalle, en el detalle tengo como llave primaria Serie+Folio+Indice

El problema que tengo es que cuando tengo varios registros y quiero insertar un registro entre ellos al guardar el Registro Nuevo me lo Inserta al Final usando INSERT.

En el ibDataset Detalle no uso ningún order by.
Ejemplo:
Serie Folio Indice
XX 00001 1
XX 00001 2
XX 00001 3
XX 00001 4

Si Inserto en el Medio el Quinto Registro

Serie Folio Indice
XX 00001 1
XX 00001 2
XX 00001 5
XX 00001 3
XX 00001 4

Al Guardar me Queda así:

Serie Folio Indice
XX 00001 1
XX 00001 2
XX 00001 3
XX 00001 4
XX 00001 5

La solución sería quitar la llave primaria pero Rompo la Integridad de la Tabla.

Había pensado también usar el campo indice de tipo Flotante Sumandole al registro nuevo 0.01 con respecto al Anterior.
Serie Folio Indice
XX 00001 1.0
XX 00001 2.0
XX 00001 2.1
XX 00001 3.0
XX 00001 4.0

Alguna sugerencia más????

Agradezco Mucho cualquier información.

Última edición por AGAG4 fecha: 17-01-2006 a las 23:57:30.
Responder Con Cita