Alpha DevCon 2018
Results 1 to 2 of 2

Thread: How do I make sure a SET is correctly synchronized with tables

  1. #1
    Member
    Real Name
    Michael Klein
    Join Date
    Sep 2003
    Posts
    250

    Default How do I make sure a SET is correctly synchronized with tables

    Hi all. I have created an Xbasic script based on an update operation. The script (#3 below) is part of the job stream (multiple scripts) summarized below...

    1. Copy 3 .DBF tables (items, departments, & types) from another, non-Alpha5 application, to a "Work" folder.
    2. Create Alpha5 indexes (.CDX files) for the 3 tables in the "Work" folder and COPY the indexes to the non-Alpha5 data folder.
    3. Change the prices in the items table using a SET (items -> types -> departments) where all tables are in ONE-TO-ONE relationships. I have been using table.reset("items_types_dept.set") after creating the indexes to make sure the SET matches the tables with the newly created indexes. This is followed by an a_tbl=table.current(), and then a filtered QUERY is performed on the SET.

    Unfortunately, I just learned from the Alpha5 v11 Help file that table.reset() should only be used in the Interactive Window as unpredictable results may occur if used in a script. So what's the best way to make sure that the SET matches the tables after the new indexes are created? Should I use table.open() on the SET instead of table.reset()? Is there something I'm missing? Any help would be appreciated.

    Thanks.
    Michael

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,100

    Default Re: How do I make sure a SET is correctly synchronized with tables

    So what's the best way to make sure that the SET matches the tables after the new indexes are created?
    You may be overthinking the issue. A set is merely a definition of the linking between, usually, two or more tables. This definition can include layouts defined for the linked group. A set holds no data. I can't see any reason to be concerned about the set definition becoming "out of date" if you manipulate the underlying tables in the manner you describe.

    If you are performing this manipulation while viewing a layout base on the set you would need to resynch the layout to the set. (button code - Parentform.resynch())
    There can be only one.

Similar Threads

  1. MAKE two TABLES INTO ONE
    By deputy956 in forum Alpha Five Version 10 - Desktop Applications
    Replies: 2
    Last Post: 05-10-2012, 04:49 PM
  2. Design Mode tables don't match set tables
    By goldberg2727 in forum Alpha Five Version 10 - Desktop Applications
    Replies: 3
    Last Post: 01-11-2010, 02:31 PM
  3. Trouble creating 3 table set that works correctly
    By Rudy16 in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 07-23-2009, 04:00 AM
  4. Set children records will not display correctly
    By rmcgaffic in forum Alpha Five Version 9 - Desktop Applications
    Replies: 52
    Last Post: 08-24-2008, 10:16 PM
  5. Linking Tables together to make a set
    By anolian in forum Web Application Server v7
    Replies: 15
    Last Post: 04-13-2006, 04:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •