Alpha DevCon 2018
Results 1 to 5 of 5

Thread: Browse program not running with correct database at runtime

  1. #1
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    30

    Default Browse program not running with correct database at runtime

    Background ...

    Before modifying a table and form I duplicated the table as a backup and Alpha5 makes
    a copy of what I will call all its control table objects associated with the table.

    Code:
    Test/Development System Browses tab
    Name . .Type ... Table/Set
    Browse1    Browse  Pop records
    Browse1    Browse  pop_records_bkp
    
    Production/Live System Browses tab
    Name . .Type ... Table/Set
    Browse1    Browse  pop_records_bkp
    Browse1    Browse  Pop records
    Notice that the Browse1 program associated with the backup table appears 2nd in the
    Test/Development system and 1st in the Production/Live system. The Browse1 program works
    as expected in the Test/Development system but fails in the Production/Live system because
    it executes the browse1 program associated with the backup table which appear 1st here.

    Question/Problem ...

    I am able to sort the browses Table/Sets column then the Name column and get it ordered so the
    Browse1 program associated with the Pop records database appears 1st in the Production/Live
    system and everything works as expected. It has to "remember" the setting and I do this by
    closing then reopening the database, but after a Windows Restart it goes back to the same bad
    behavior.

    Has anyone else seen this kind of behavior?

    It's like I cannot have a browse program with the same name in a database even if it is associated with another table.
    Last edited by Al Buchholz; 07-07-2017 at 01:19 PM.

  2. #2
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,479

    Default Re: Browse program not running with correct database at runtime

    Quote Originally Posted by markG View Post
    Background ...

    Before modifying a table and form I duplicated the table as a backup and Alpha5 makes
    a copy of what I will call all its control table objects associated with the table.

    Code:
    Test/Development System Browses tab
    Name . .Type ... Table/Set
    Browse1    Browse  Pop records
    Browse1    Browse  pop_records_bkp
    
    Production/Live System Browses tab
    Name . .Type ... Table/Set
    Browse1    Browse  pop_records_bkp
    Browse1    Browse  Pop records
    Notice that the Browse1 program associated with the backup table appears 2nd in the
    Test/Development system and 1st in the Production/Live system. The Browse1 program works
    as expected in the Test/Development system but fails in the Production/Live system because
    it executes the browse1 program associated with the backup table which appear 1st here.

    Question/Problem ...

    I am able to sort the browses Table/Sets column then the Name column and get it ordered so the
    Browse1 program associated with the Pop records database appears 1st in the Production/Live
    system and everything works as expected. It has to "remember" the setting and I do this by
    closing then reopening the database, but after a Windows Restart it goes back to the same bad
    behavior.

    Has anyone else seen this kind of behavior?

    It's like I cannot have a browse program with the same name in a database even if it is associated with another table.
    It is a best practice to have unique names for objects. It is not required.

    If you work with action scripting, you'll notice that duplicated names use a fully referenced name <object>@<table_or_set> and then there is no confusion.

    It is also helpful to use the detail view of the control panel so you can see what table/set the object is based on. I keep that as my standard in all workspaces/databases.
    Last edited by Al Buchholz; 07-07-2017 at 01:19 PM.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,992

    Default Re: Browse program not running with correct database at runtime

    See the documentation for browse.view()

    Browse_Name
    V5
    The name of the browse to open. In the case where there are duplicate browse names in the database, you can qualify the browse name with the table name using this syntax: Browse Name@Table Name. For example, if a database has a browse called "Customers" for the "Current_Customers" and the "Past_Customers" tables, you can specify the browse as: "Customers@Current_Customers", or "Customers@Past_Customers".
    There can be only one.

  4. #4
    Member
    Real Name
    Mark Gallagher
    Join Date
    Feb 2017
    Location
    Sarasota, Florida
    Posts
    30

    Default Re: Browse program not running with correct database at runtime

    Alan and Stan -

    Thanks for your direction and help, this fixed my problem.

    Mark

  5. #5
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,479

    Default Re: Browse program not running with correct database at runtime

    Quote Originally Posted by markG View Post
    Alan and Stan -

    Thanks for your direction and help, this fixed my problem.

    Mark
    No problem. I've run into that many times. So the first thing I do with a workspace/database is to set detail view...
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

Similar Threads

  1. Having problems running a database with runtime
    By SteveR in forum Alpha Five Version 5
    Replies: 8
    Last Post: 10-24-2006, 10:32 AM
  2. running external program
    By lkatz1 in forum Alpha Five Version 5
    Replies: 4
    Last Post: 08-25-2004, 04:36 AM
  3. Running external program
    By George Corder in forum Alpha Five Version 5
    Replies: 3
    Last Post: 06-04-2003, 03:30 PM
  4. Running Program on a CD
    By Barron Weant in forum Alpha Five Version 5
    Replies: 6
    Last Post: 05-17-2003, 11:27 AM
  5. Running a DOS Program
    By Gregory Zilliox in forum Alpha Five Version 4
    Replies: 4
    Last Post: 11-03-2000, 04:04 AM

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
  •