Results 1 to 4 of 4
  1. #1
    russ0670 is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    21

    lookup database name on MYsql backend

    I have a MSACCESS frontend that can link to two possible backends both are hosted on the same MYSQL server but differend DB names. One containing live data and one with testing data.

    I want to display which database is connected on the login form to ensure that someone using the testing system does not accidentially use live data.

    when originally using an access backend i used the below code.

    Code:
    Dim dbpath As String
    dbpath = CurrentDb.TableDefs("users").Connect
    I have now migrated the database to a online hosted MYSQL backend to enable multiple user access from multiple of-site locations and obviously this above code is not working in the MSACCESS frontend.

    does anyone know a similar code to display the name of the mysql database the system is linked to (via ODBC and linked tables).

    thanks.

  2. #2
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    So you access the test data and the live data through the same front end? I would suggest a separate front end for each (just a copy of the other with a different name...)

  3. #3
    russ0670 is offline Novice
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Posts
    21

    further info.

    Thanks for the reply. Sorry should have specified more.

    We use the testing data to test changes to the database frontend before impelenting it.

    We do use a second copy of the live Front End and change the linked tables to point to the backend testing data.

    The problem is that the people who do the coding also use the live database on a day to day basis and when they are open they are identical. So i would like to use the path to show on the switchboard which DB is is linked to and stop the wrong copy being used.

    The code above worked perfectly when the BE was MSACCESS but now its on a MySQL server i need to change this accordingly but dont have a clue how to query what the linked data path or what the connected MySQL DB name is.

  4. #4
    Stingaway is offline Efficiency Junkie
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2011
    Location
    The deep south. Keep going until you hit water basically.
    Posts
    224
    How about just a nice little message on the live copy of the front end form saying "HEY YOU ARE IN LIVE DATA" and a message on the other copy (the test data form) saying "HEY YOU ARE IN TEST DATA")...

    or something static, since you have two copies anyway and it doesn't really matter what the link is as it is always going to be the same for the front end you are using?

    Just a thought... (random one at that..)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-25-2011, 11:16 AM
  2. Sharepoint Lists vs Web database as backend
    By is49460 in forum SharePoint
    Replies: 1
    Last Post: 10-28-2011, 04:27 PM
  3. Data transfer to restructured backend database
    By RANCHLAW56 in forum Access
    Replies: 1
    Last Post: 09-06-2011, 01:47 PM
  4. access split DB to mySQL (backend only)
    By rnbwkat in forum Access
    Replies: 1
    Last Post: 05-31-2010, 07:19 PM
  5. lookup values in backend tables
    By deb56 in forum Database Design
    Replies: 1
    Last Post: 01-23-2008, 11:12 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums