object srvObras: TsrvObras OldCreateOrder = True OnCreate = DARemoteServiceCreate RequiresSession = True SessionManager = dmServer.SessionManager ConnectionName = 'IBX' ServiceSchema = schObras ServiceDataStreamer = Bin2DataStreamer ExportedDataTables = <> BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection Height = 249 Width = 343 object Diagrams: TDADiagrams Left = 150 Top = 82 DiagramData = ''#13#10''#13#10 end object DataDictionary: TDADataDictionary Fields = < item Name = 'Obras_CALLE' DataType = datString Size = 255 DisplayLabel = 'Calle' end item Name = 'Obras_PROVINCIA' DataType = datString Size = 255 DisplayLabel = 'Provincia' end item Name = 'Obras_POBLACION' DataType = datString Size = 255 DisplayLabel = 'Poblaci'#243'n' end item Name = 'Obras_CODIGO_POSTAL' DataType = datString Size = 10 DisplayLabel = 'C'#243'digo postal' end item Name = 'Obras_TELEFONO' DataType = datString Size = 25 DisplayLabel = 'Tel'#233'fono' end item Name = 'Obras_MOVIL' DataType = datString Size = 25 DisplayLabel = 'M'#243'vil' end item Name = 'Obras_FAX' DataType = datString Size = 25 DisplayLabel = 'Fax' end item Name = 'Obras_OBSERVACIONES' DataType = datMemo DisplayLabel = 'Observaciones' end item Name = 'Obras_ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' Required = True DisplayLabel = 'ID' ServerAutoRefresh = True end item Name = 'Obras_ID_EMPRESA' DataType = datInteger DisplayLabel = 'ID_EMPRESA' end item Name = 'Obras_FECHA_ALTA' DataType = datDateTime DisplayLabel = 'FECHA_ALTA' end item Name = 'Obras_PERSONA_CONTACTO' DataType = datString Size = 255 DisplayLabel = 'Persona de contacto' end item Name = 'Obras_FECHA_MODIFICACION' DataType = datDateTime DisplayLabel = 'FECHA_MODIFICACION' end item Name = 'Obras_USUARIO' DataType = datString Size = 20 DisplayLabel = 'USUARIO' end item Name = 'Obras_NOMBRE' DataType = datString Size = 255 DisplayLabel = 'Nombre' end item Name = 'Obras_ID_CLIENTE' DataType = datInteger end item Name = 'Obras_NOMBRE_CLIENTE' DataType = datString Size = 255 DisplayLabel = 'Cliente' end item Name = 'Obras_ID_SUBCONTRATA' DataType = datInteger end item Name = 'Obras_NOMBRE_SUBCONTRATA' DataType = datString Size = 255 DisplayLabel = 'Subcontrata' end> Left = 150 Top = 22 end object schObras: TDASchema ConnectionManager = dmServer.ConnectionManager DataDictionary = DataDictionary Diagrams = Diagrams Datasets = < item Params = <> Statements = < item Connection = 'IBX' TargetTable = 'V_OBRAS' StatementType = stAutoSQL ColumnMappings = < item DatasetField = 'ID' TableField = 'ID' end item DatasetField = 'ID_EMPRESA' TableField = 'ID_EMPRESA' end item DatasetField = 'NOMBRE' TableField = 'NOMBRE' end item DatasetField = 'CALLE' TableField = 'CALLE' end item DatasetField = 'PROVINCIA' TableField = 'PROVINCIA' end item DatasetField = 'POBLACION' TableField = 'POBLACION' end item DatasetField = 'CODIGO_POSTAL' TableField = 'CODIGO_POSTAL' end item DatasetField = 'TELEFONO' TableField = 'TELEFONO' end item DatasetField = 'MOVIL' TableField = 'MOVIL' end item DatasetField = 'FAX' TableField = 'FAX' end item DatasetField = 'PERSONA_CONTACTO' TableField = 'PERSONA_CONTACTO' end item DatasetField = 'OBSERVACIONES' TableField = 'OBSERVACIONES' end item DatasetField = 'ID_CLIENTE' TableField = 'ID_CLIENTE' end item DatasetField = 'NOMBRE_CLIENTE' TableField = 'NOMBRE_CLIENTE' end item DatasetField = 'FECHA_ALTA' TableField = 'FECHA_ALTA' end item DatasetField = 'FECHA_MODIFICACION' TableField = 'FECHA_MODIFICACION' end item DatasetField = 'USUARIO' TableField = 'USUARIO' end item DatasetField = 'ID_SUBCONTRATA' TableField = 'ID_SUBCONTRATA' end item DatasetField = 'NOMBRE_SUBCONTRATA' TableField = 'NOMBRE_SUBCONTRATA' end> end> Name = 'Obras' Fields = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' ServerAutoRefresh = True DictionaryEntry = 'Obras_ID' InPrimaryKey = True end item Name = 'ID_EMPRESA' DataType = datInteger DictionaryEntry = 'Obras_ID_EMPRESA' end item Name = 'NOMBRE' DataType = datString Size = 255 DictionaryEntry = 'Obras_NOMBRE' end item Name = 'CALLE' DataType = datString Size = 255 DictionaryEntry = 'Obras_CALLE' end item Name = 'PROVINCIA' DataType = datString Size = 255 DictionaryEntry = 'Obras_PROVINCIA' end item Name = 'POBLACION' DataType = datString Size = 255 DictionaryEntry = 'Obras_POBLACION' end item Name = 'CODIGO_POSTAL' DataType = datString Size = 10 DictionaryEntry = 'Obras_CODIGO_POSTAL' end item Name = 'TELEFONO' DataType = datString Size = 25 DictionaryEntry = 'Obras_TELEFONO' end item Name = 'MOVIL' DataType = datString Size = 25 DictionaryEntry = 'Obras_MOVIL' end item Name = 'FAX' DataType = datString Size = 25 DictionaryEntry = 'Obras_FAX' end item Name = 'PERSONA_CONTACTO' DataType = datString Size = 255 DictionaryEntry = 'Obras_PERSONA_CONTACTO' end item Name = 'OBSERVACIONES' DataType = datMemo DictionaryEntry = 'Obras_OBSERVACIONES' end item Name = 'ID_CLIENTE' DataType = datInteger DictionaryEntry = 'Obras_ID_CLIENTE' end item Name = 'NOMBRE_CLIENTE' DataType = datString Size = 255 ServerAutoRefresh = True DictionaryEntry = 'Obras_NOMBRE_CLIENTE' end item Name = 'ID_SUBCONTRATA' DataType = datInteger DictionaryEntry = 'Obras_ID_SUBCONTRATA' end item Name = 'NOMBRE_SUBCONTRATA' DataType = datString Size = 255 DictionaryEntry = 'Obras_NOMBRE_SUBCONTRATA' end item Name = 'FECHA_ALTA' DataType = datDateTime DictionaryEntry = 'Obras_FECHA_ALTA' end item Name = 'FECHA_MODIFICACION' DataType = datDateTime DictionaryEntry = 'Obras_FECHA_MODIFICACION' end item Name = 'USUARIO' DataType = datString Size = 20 DictionaryEntry = 'Obras_USUARIO' end> end> JoinDataTables = <> UnionDataTables = <> Commands = < item Params = < item Name = 'ID' DataType = datAutoInc GeneratorName = 'GEN_ALMACENES_ID' Value = '' end item Name = 'ID_EMPRESA' Value = '' end item Name = 'NOMBRE' Value = '' end item Name = 'CALLE' Value = '' end item Name = 'PROVINCIA' Value = '' end item Name = 'POBLACION' Value = '' end item Name = 'CODIGO_POSTAL' Value = '' end item Name = 'TELEFONO' Value = '' end item Name = 'MOVIL' Value = '' end item Name = 'FAX' Value = '' end item Name = 'PERSONA_CONTACTO' Value = '' end item Name = 'OBSERVACIONES' Value = '' end item Name = 'USUARIO' Value = '' end> Statements = < item Connection = 'IBX' Default = True TargetTable = 'ALMACENES' SQL = 'INSERT'#10' INTO ALMACENES'#10' (ID, ID_EMPRESA, TIPO_ALMACEN, NOMBR' + 'E, CALLE, PROVINCIA, POBLACION, CODIGO_POSTAL,'#10' TELEFONO, MO' + 'VIL, FAX, PERSONA_CONTACTO, OBSERVACIONES, '#10' FECHA_ALTA, USU' + 'ARIO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, '#39'OBRA'#39', :NOMBRE, :CALLE, :' + 'PROVINCIA, :POBLACION,'#10' :CODIGO_POSTAL, :TELEFONO, :MOVIL, :' + 'FAX, :PERSONA_CONTACTO, '#10' :OBSERVACIONES, CURRENT_DATE, :USU' + 'ARIO)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_Obras' end item Params = < item Name = 'OLD_ID' Value = '' end> Statements = < item Connection = 'IBX' Default = True TargetTable = 'ALMACENES' SQL = 'DELETE '#10' FROM'#10' ALMACENES'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_Obras' end item Params = < item Name = 'ID_EMPRESA' Value = '' end item Name = 'NOMBRE' Value = '' end item Name = 'CALLE' Value = '' end item Name = 'PROVINCIA' Value = '' end item Name = 'POBLACION' Value = '' end item Name = 'CODIGO_POSTAL' Value = '' end item Name = 'TELEFONO' Value = '' end item Name = 'MOVIL' Value = '' end item Name = 'FAX' Value = '' end item Name = 'PERSONA_CONTACTO' Value = '' end item Name = 'OBSERVACIONES' Value = '' end item Name = 'FECHA_MODIFICACION' Value = '' end item Name = 'USUARIO' Value = '' end item Name = 'OLD_ID' Value = '' end> Statements = < item Connection = 'IBX' Default = True TargetTable = 'ALMACENES' SQL = 'UPDATE ALMACENES'#10' SET '#10' ID_EMPRESA = :ID_EMPRESA, '#10' NOMBR' + 'E = :NOMBRE, '#10' CALLE = :CALLE, '#10' PROVINCIA = :PROVINCIA, '#10 + ' POBLACION = :POBLACION, '#10' CODIGO_POSTAL = :CODIGO_POSTAL,' + ' '#10' TELEFONO = :TELEFONO, '#10' MOVIL = :MOVIL, '#10' FAX = :FAX' + ', '#10' PERSONA_CONTACTO = :PERSONA_CONTACTO, '#10' OBSERVACIONES ' + '= :OBSERVACIONES, '#10' FECHA_MODIFICACION = :FECHA_MODIFICACION,' + #10' USUARIO = :USUARIO'#10' WHERE'#10' (ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Update_Obras' end item Params = < item Name = 'ID_ALMACEN' DataType = datInteger Value = '0' end item Name = 'ID_CLIENTE' DataType = datInteger Value = '0' end item Name = 'ID_SUBCONTRATA' DataType = datInteger Value = '0' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_DATOS' SQL = 'INSERT'#10' INTO OBRAS_DATOS'#10' (ID_ALMACEN, ID_CLIENTE, ID_SUBCON' + 'TRATA)'#10' VALUES'#10' (:ID_ALMACEN, :ID_CLIENTE, :ID_SUBCONTRATA)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_OBRAS_DATOS' end item Params = < item Name = 'OLD_ID_ALMACEN' DataType = datInteger Value = '0' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_DATOS' SQL = 'DELETE '#10' FROM'#10' OBRAS_DATOS'#10' WHERE'#10' (ID_ALMACEN = :OLD_ID' + '_ALMACEN)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_OBRAS_DATOS' end item Params = < item Name = 'ID_CLIENTE' Value = '' end item Name = 'ID_SUBCONTRATA' Value = '' end item Name = 'OLD_ID_ALMACEN' Value = '' end> Statements = < item ConnectionType = 'Interbase' Default = True TargetTable = 'OBRAS_DATOS' SQL = 'UPDATE OBRAS_DATOS'#10' SET '#10' ID_CLIENTE = :ID_CLIENTE,'#10' ID_S' + 'UBCONTRATA = :ID_SUBCONTRATA'#10' WHERE'#10' (ID_ALMACEN = :OLD_ID_A' + 'LMACEN)'#10 StatementType = stSQL ColumnMappings = <> end> Name = 'Update_OBRAS_DATOS' end> RelationShips = <> UpdateRules = <> Version = 0 Left = 48 Top = 24 end object Bin2DataStreamer: TDABin2DataStreamer Left = 48 Top = 80 end object bpObras: TDABusinessProcessor Schema = schObras InsertCommandName = 'Insert_Obras' DeleteCommandName = 'Delete_Obras' UpdateCommandName = 'Update_Obras' ReferencedDataset = 'Obras' ProcessorOptions = [poPrepareCommands] UpdateMode = updWhereKeyOnly Left = 248 Top = 24 end end