FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Relacion Maestro-Detalle
Buenas noches,
He creado una relacion maestro-detalles con las propiedades MasterSource y MasterFields, tengo tres DBGrid, productos, productosProveedor, Stock, de inicio todo funciona bien, pero al moverme por productos, en los demas DBGrid se van creando automaticamente registros, he probado todo, pero no hay forma de solucionarlo, me pueden ayudar? gracias. |
#2
|
||||
|
||||
¿Y el código fuente de lo que estás haciendo?, explica con detalle lo que haces y lo que necesitas, componentes, base de datos, etc.
|
#3
|
||||
|
||||
se van creando registros?
que quieres decir con eso? cual es la finalidad de este Maestro-Detalle? solo consultar? adiccionar datos? cual es el flujo? debes ser un poquito mas explicito para tener una mejor idea y ayudarte saludos
__________________
Dulce Regalo que Satanas manda para mi..... |
#4
|
|||
|
|||
Relacion Maestro-Detalle
Les Comento:
Tengo estas cuatro tablas: De momento no tengo código, solo componentes: TADOQuery, TDataSetProvider, TClientDataSet para cada componente, también un TDataSource enlazado al TClientDataSet Items que es la tabla maestra, y en el resto que son los detalles, através de la propiedad MasterSource apunta al TDataSource Items, y MasterField con ItemID > ItemID, en el formulario tengo cuatro DBGrid,todos enlazados con un DataSource. Inicio el formulario y todo esta correcto, DBGrid Items está situado en el primer registro y todos los demás DBGrid muestran los registros correspondientes, selecciono otro registro en DBGrid Items y los DBGrid Detalle esta todo correcto, pero ahora selecciono el registro anterior y los DBGrid que apuntan a ItemProvider y Stock, automaticamente se duplican los registros, selecciono otro registro, y vuelvo al registro otra vez y se vuelve a duplicar, no hay codigo, estoy trabajando con delphi 2010 y MySql, es posible que sea por el primary Key, ya que el DBGrid ItemBarCodes no se duplica y da la casualidad que sus claves primarias son ItemID, en cambio en ItemProvider es PRIMARY KEY (ItemID, ItemProvider,ProviderID) y en Stock PRIMARY KEY (IntCodID,ItemID,WareHouseID), espero que asi puedan entender mi problema, gracias. Última edición por Casimiro Notevi fecha: 23-06-2011 a las 10:20:44. Razón: Poner etiquetas [sql] [/sql] |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Saber si el DBGrid (Detalle) esta Vacio en Relacion Maestro/Detalle | Adrian Murua | Conexión con bases de datos | 2 | 03-01-2009 13:48:46 |
Relacion Maestro Detalle | einarcito | Varios | 7 | 09-10-2008 13:56:41 |
Respecto a la relacion maestro detalle detalle | ilichhernandez | Conexión con bases de datos | 0 | 15-05-2007 18:13:54 |
relacion maestro detalle TDBGrid | caperucitaazul | C++ Builder | 0 | 08-02-2006 00:40:49 |
Relacion Maestro Detalle | oneromm | Conexión con bases de datos | 3 | 18-12-2003 21:57:40 |
|