display location of linked db

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • susan

    display location of linked db

    Hi,

    In my application I want the location of my application-database as well as
    the location of my data-database to be displayed.

    I retrieve the name of the application by:
    ApplName = DBEngine(0)(0). Name

    In the application I use links to the tables of my data-database.
    How can I retrieve the location / name of the data-database?

    DataName = <link to data-database>

    Thanks,

    susan


  • Stuart McCall

    #2
    Re: display location of linked db

    "susan" <vdb@hotmail.co mwrote in message
    news:aed08$4845 0dcf$524b37b6$2 5507@cache3.til bu1.nb.home.nl. ..
    Hi,
    >
    In my application I want the location of my application-database as well
    as the location of my data-database to be displayed.
    >
    I retrieve the name of the application by:
    ApplName = DBEngine(0)(0). Name
    >
    In the application I use links to the tables of my data-database.
    How can I retrieve the location / name of the data-database?
    >
    DataName = <link to data-database>
    >
    Thanks,
    >
    susan
    Grab this procedure (you'll find instructions how to do this if you're not
    sure) :



    Then use it like this:

    DataName = ConnectPart("DA TABASE")



    Comment

    • susan

      #3
      Re: display location of linked db


      "Stuart McCall" <smccall@myunre albox.comschree f in bericht
      news:g233k5$kri $1$8300dec7@new s.demon.co.uk.. .
      "susan" <vdb@hotmail.co mwrote in message
      news:aed08$4845 0dcf$524b37b6$2 5507@cache3.til bu1.nb.home.nl. ..
      >Hi,
      >>
      >In my application I want the location of my application-database as well
      >as the location of my data-database to be displayed.
      >>
      >I retrieve the name of the application by:
      >ApplName = DBEngine(0)(0). Name
      >>
      >In the application I use links to the tables of my data-database.
      >How can I retrieve the location / name of the data-database?
      >>
      >DataName = <link to data-database>
      >>
      >Thanks,
      >>
      >susan
      >
      Grab this procedure (you'll find instructions how to do this if you're not
      sure) :
      >

      >
      Then use it like this:
      >
      DataName = ConnectPart("DA TABASE")
      >
      >
      >
      Too bad. Dead link...


      Comment

      • Stuart McCall

        #4
        Re: display location of linked db

        "susan" <vdb@hotmail.co mwrote in message
        news:47a13$4845 267a$524b37b6$1 9963@cache1.til bu1.nb.home.nl. ..
        >
        "Stuart McCall" <smccall@myunre albox.comschree f in bericht
        news:g233k5$kri $1$8300dec7@new s.demon.co.uk.. .
        >"susan" <vdb@hotmail.co mwrote in message
        >news:aed08$484 50dcf$524b37b6$ 25507@cache3.ti lbu1.nb.home.nl ...
        >>Hi,
        >>>
        >>In my application I want the location of my application-database as well
        >>as the location of my data-database to be displayed.
        >>>
        >>I retrieve the name of the application by:
        >>ApplName = DBEngine(0)(0). Name
        >>>
        >>In the application I use links to the tables of my data-database.
        >>How can I retrieve the location / name of the data-database?
        >>>
        >>DataName = <link to data-database>
        >>>
        >>Thanks,
        >>>
        >>susan
        >>
        >Grab this procedure (you'll find instructions how to do this if you're
        >not sure) :
        >>
        >http://www.smccall.demon.co.uk/DAO.htm#ConnectPart
        >>
        >Then use it like this:
        >>
        >DataName = ConnectPart("DA TABASE")
        >>
        >>
        >>
        Too bad. Dead link...
        It seems my ISP is having problems (I can't access my site either). Please
        try again sometime later. They usually fix problems fairly quickly - I'd say
        give it a couple of hours.


        Comment

        • Wayne Gillespie

          #5
          Re: display location of linked db

          On Tue, 3 Jun 2008 11:24:42 +0200, "susan" <vdb@hotmail.co mwrote:
          >Hi,
          >
          >In my application I want the location of my application-database as well as
          >the location of my data-database to be displayed.
          >
          >I retrieve the name of the application by:
          >ApplName = DBEngine(0)(0). Name
          >
          >In the application I use links to the tables of my data-database.
          >How can I retrieve the location / name of the data-database?
          >
          >DataName = <link to data-database>
          >
          >Thanks,
          >
          >susan
          >
          Assuming the table is a JET table (NOT ODBC) then passing the table name to this
          function will return the path of the database containing the linked table.

          Function fGetLinkPath(st rTableName As String) As String
          Dim strConnect As String

          strConnect = CurrentDb.Table Defs(strTableNa me).Connect
          fGetLinkPath = Right(strConnec t, Len(strConnect) - 10)

          End Function


          Wayne Gillespie
          Gosford NSW Australia

          Comment

          • Larry Linson

            #6
            Re: display location of linked db

            "susan" <vdb@hotmail.co mwrote in message
            news:aed08$4845 0dcf$524b37b6$2 5507@cache3.til bu1.nb.home.nl. ..
            Hi,
            >
            In my application I want the location of my application-database as well
            as the location of my data-database to be displayed.
            >
            I retrieve the name of the application by:
            ApplName = DBEngine(0)(0). Name
            >
            In the application I use links to the tables of my data-database.
            How can I retrieve the location / name of the data-database?
            >
            DataName = <link to data-database>
            In the Immediate Window, where "tblSampleForLi nk" is the name of a linked
            table, the following returns the Connect property, from which you can
            extract the path and name of a linked Access database.

            (Caveat 1: the Connect property will differ depending on the type of
            database in which the linked table resides. A linked table in SQL Server or
            Oracle will have a different structure for the Connect property's string
            value, for example.
            Caveat 2: It is possible to link to tables in more than one database, and
            if that is the case in your application, you will need to choose a table in
            each, if you want to display each linked DB.)

            ? CurrentDB().Tab leDefs("tblSamp leForLink").Con nect
            ;DATABASE=C:\da ta\Access\Acces s2003\A2003Test BackEnd.mdb

            My sample code is from a database created in Access 2003, but should be the
            same for any previous 32-bit version of Access.

            Larry Linson
            Microsoft Office Access MVP


            Comment

            Working...