Problem with multiple databases

blikens
blikens Member Posts: 10
edited 2001-06-04 in Navision Financials
My company has its LIVE database on one server, a test database on another, and then individual copies on hard drives for employees doing form and report design. The design employees synch their work product into the test database and after testing and evaluation, the test database is synched to the live database. The Live database has a different colored bmp for the main menu so users can tell when they are in the live database. Is there a system variable that would allow me to determine if I am working on local database or the network test database so I can change a caption or give myself some sort of warning if I start to do something and I'm not where I thought I was...

Comments

  • SimonW
    SimonW Member Posts: 77
    How about basing your solution on the COMPANYNAME (or part thereof)?
  • blikens
    blikens Member Posts: 10
    That's a reasonable suggestion, but all the databases are based on the live database and all share the same company name. I suppose I could rename the companyname on each system, but was hoping there might be a system variable with database path.
  • Soren_Nielsen
    Soren_Nielsen Member Posts: 2
    Take a look at 2000000010 Database file, this table holds the information you need.


    Soren,
    www.navision.net - the #1 source for navision information
  • blikens
    blikens Member Posts: 10
    I don't have a 2000000010 object in my tables, but I'm betting that granule is associated with multiple live database licenses. I'm sure it would have been an elegant solution, but back to the drawing boards. I'll have most of the modifications finished shortly, so the issue will be moot, but I was curious to learn a little extra (and maybe keep myself from having to repeat some work). Thanks
  • Mohan
    Mohan Member Posts: 7
    hi ,
    as soren said that you can find out the database name in any place of code.You cann't see the Database file Object from the Object designer,but you can see the database file from the C/AL Globals or you can create a form from that table.These tables are called virtual tables.Just create a variable to the database file object.
    dtfile record databasefile

    in Code you can write the following lines to find out the database name.
    dtfile.find('-');
    databasepath := dtfile."File name";

    now you got the database file path in the Databasepath variable.
    now you can check out is it Locat database or server database,using string operations.

    Mohan


    [This message has been edited by Mohan (edited 03-06-2001).]
  • blikens
    blikens Member Posts: 10
    Thanks for the insight. This solved my issue quite handily!!!