Alpha Video Training
Results 1 to 3 of 3

Thread: Set Structure

  1. #1
    Member ChrisHawkes's Avatar
    Real Name
    Chris Hawkes
    Join Date
    Apr 2000
    Location
    Dorset, UK
    Posts
    295

    Default Set Structure

    What is the best way to determine a sets linking type in xbasic?

    I've tried Set.Structure_Get() with, what seems to be incorrect results. Perhaps I'll have to go deeper into the set's dictionary, but I don't know what to look for without experimenting.

    e.g.
    A standard 1:M set
    Set.Structure_Get("Cust_Del.set","T"
    always shows "Many Many"

    or
    A standard 1:1(first) set
    shows "Many First"
    If It Works First Time, There's Something Wrong!!!

  2. #2
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,419

    Default Re: Set Structure

    Chris,

    On testing this it appears that the first item returned is always the top level table and is always designated as many even if anything below it is only linked by 1:1, not very helpful and maybe a bug. The "G" parameter is pretty helpful as this shows what is what. The following is based on Inventory set in alphasports
    Code:
    ? set.structure_get("inventory","t"+ crlf())
    = Many 
    First 
    
    
    
    
    ? set.structure_get("inventory","g"+ crlf())
    = (Many)PRODUCT
    (Many)PRODUCT.(First)VENDOR
    Nice AEX in the code archive the other day, thank-you

  3. #3
    Member ChrisHawkes's Avatar
    Real Name
    Chris Hawkes
    Join Date
    Apr 2000
    Location
    Dorset, UK
    Posts
    295

    Default Re: Set Structure

    Thanks Lance for replying & confirming.

    I've now managed to do what I want using the dictionary functions.

    Glad you liked the AEX and hope you find it useful. I've been resurrecting some old code I haven't touched for a long time in a v6 database. Most of the functions have been superceded by newer, better code. The functions in the archive were produced while learning xdialog.
    If It Works First Time, There's Something Wrong!!!

Similar Threads

  1. Set Structure
    By Esio Trot in forum Alpha Five Version 8
    Replies: 6
    Last Post: 07-04-2007, 11:10 AM
  2. set structure theory???
    By Alan Lee in forum Alpha Five Version 6
    Replies: 1
    Last Post: 03-13-2005, 06:36 AM
  3. Set structure causes A5 to lock up
    By brett s in forum Alpha Five Version 5
    Replies: 2
    Last Post: 12-19-2004, 10:50 AM
  4. Copying a set structure
    By Leo Cohen in forum Alpha Five Version 6
    Replies: 3
    Last Post: 09-07-2004, 10:29 AM
  5. help with set structure
    By MIKKI BREAUX in forum Alpha Five Version 5
    Replies: 3
    Last Post: 12-12-2002, 06:13 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
  •