Menu

Non DB-Aware Use

Help
2004-04-26
2004-05-04
  • Sean Kearon

    Sean Kearon - 2004-04-26

    Hi

    Just wondering if you have any examples of using IO wihout the dataaware controls. I am trying to create Part and Reference repaltionships in code and am having trouble.

    Any examples/documentation would be a great help.

    Thanks

    Sean

     
    • Henrik Gřttig

      Henrik Gřttig - 2004-05-04

      I have done this several times.

      Can you be more specific about your problem?

      Example:
      Say TOrder, TCustomer and TOrderLine is defined i the Model Explorer.
      TOrder has a Parts relationship to TOrderLine and a Reference relationship to TCustomer.
      When you can do the following in (pseudo) code:

      Customer := TCustomer.Create();
      // Set attributes for customer
      Customer.Store;

      Order := TOrder.Create;
      // Add relationship to OrderLine
      Line := TOrderLine.Create;
      // Set attributes for Line
      Order.AddOrderLine(Line);
      // OR
      Order.OrderLines.Add(Line);
      // Reference the customer created earlier.
      Order.Customer := Customer;
      Order.Store;

      The actual name of the "AddOrderLine" method or the "OrderLines" attribute depends on what you enter as attribute name (plural and not plural) when you define the class in the Model Explorer.

      Hope this helps...

      Regards

      Henrik Gttig

       

Log in to post a comment.

MongoDB Logo MongoDB