Clone data...

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

    #1

    Clone data...

    I have a situation where a user needs to clone an existing BE database
    (stored on a server) to his local machine. Assume the followings...


    User goes into the database FE which has linked BE. BE is stroed on a
    server.
    User needs to be able to click a button on the FE that will clone the
    copy of the BE on the server to C:\.
    If a copy of the BE already exists at C:\, the clone process should
    overwrite the existing copy at C:\.

    I THINK this should be easy, but the pain killers I am taking for this
    ruptured disc in my back has me a tad loopy (loopier than normal?)
    right about now. Any guidance (other than 'don't code while takling
    pain killers') is appreciated...

    DB

  • Steve

    #2
    Re: Clone data...

    Look at the Dir function in the Help file for checking if a copy of the BE
    already exists at C:\. Look at the FileCopy statement to create a clone.

    The FE will still be linked to the BE on the server. If you want to relink
    to the clone, look at TableDefs and Connection String in the Help file.

    PC Datasheet
    Providing Customers A Resource For Help With Access, Excel And Word
    Applications
    resource@pcdata sheet.com



    "DavidB" <jebva@yahoo.co mwrote in message
    news:1184788034 .831836.125110@ z28g2000prd.goo glegroups.com.. .
    >I have a situation where a user needs to clone an existing BE database
    (stored on a server) to his local machine. Assume the followings...
    >
    >
    User goes into the database FE which has linked BE. BE is stroed on a
    server.
    User needs to be able to click a button on the FE that will clone the
    copy of the BE on the server to C:\.
    If a copy of the BE already exists at C:\, the clone process should
    overwrite the existing copy at C:\.
    >
    I THINK this should be easy, but the pain killers I am taking for this
    ruptured disc in my back has me a tad loopy (loopier than normal?)
    right about now. Any guidance (other than 'don't code while takling
    pain killers') is appreciated...
    >
    DB
    >

    Comment

    • DavidB

      #3
      Re: Clone data...

      Thank you. Exactly the type and level of assistance I was looking
      for. I'll jump into the help files and get the code written up to
      accomplish the task...


      On Jul 18, 3:54 pm, "Steve" <So...@private. emailaddresswro te:
      Look at the Dir function in the Help file for checking if a copy of the BE
      already exists at C:\. Look at the FileCopy statement to create a clone.
      >
      The FE will still be linked to the BE on the server. If you want to relink
      to the clone, look at TableDefs and Connection String in the Help file.
      >
      PC Datasheet
      Providing Customers A Resource For Help With Access, Excel And Word
      Applications
      resou...@pcdata sheet.com
      >
      "DavidB" <je...@yahoo.co mwrote in message
      >
      news:1184788034 .831836.125110@ z28g2000prd.goo glegroups.com.. .
      >
      >
      >
      I have a situation where a user needs to clone an existing BE database
      (stored on a server) to his local machine. Assume the followings...
      >
      User goes into the database FE which has linked BE. BE is stroed on a
      server.
      User needs to be able to click a button on the FE that will clone the
      copy of the BE on the server to C:\.
      If a copy of the BE already exists at C:\, the clone process should
      overwrite the existing copy at C:\.
      >
      I THINK this should be easy, but the pain killers I am taking for this
      ruptured disc in my back has me a tad loopy (loopier than normal?)
      right about now. Any guidance (other than 'don't code while takling
      pain killers') is appreciated...
      >
      DB- Hide quoted text -
      >
      - Show quoted text -

      Comment

      • DavidB

        #4
        Re: Clone data...

        When I use FileCopy in an attempt to make a copy of the BE onto the
        local machine I get an Access Denied error. It looks as if the BE
        cant be copied since the FE that is attempting the copy uses that very
        same back end. Since copying a file that is open at the time can lead
        to all kinds of nasty gremlins, this is not at all surprising. I can
        however already have a copy of the BE (w/o data) on the local machine
        and then merely populate the tables in the 'clone' from the data in
        the 'live' BE via queries.


        On Jul 20, 12:01 pm, DavidB <je...@yahoo.co mwrote:
        Thank you. Exactly the type and level of assistance I was looking
        for. I'll jump into the help files and get the code written up to
        accomplish the task...
        >
        On Jul 18, 3:54 pm, "Steve" <So...@private. emailaddresswro te:
        >
        >
        >
        Look at the Dir function in the Help file for checking if a copy of the BE
        already exists at C:\. Look at the FileCopy statement to create a clone.
        >
        The FE will still be linked to the BE on the server. If you want to relink
        to the clone, look at TableDefs and Connection String in the Help file.
        >
        PC Datasheet
        Providing Customers A Resource For Help With Access, Excel And Word
        Applications
        resou...@pcdata sheet.com
        >
        "DavidB" <je...@yahoo.co mwrote in message
        >
        news:1184788034 .831836.125110@ z28g2000prd.goo glegroups.com.. .
        >
        >I have a situation where a user needs to clone an existing BE database
        (stored on a server) to his local machine. Assume the followings...
        >
        User goes into the database FE which has linked BE. BE is stroed on a
        server.
        User needs to be able to click a button on the FE that will clone the
        copy of the BE on the server to C:\.
        If a copy of the BE already exists at C:\, the clone process should
        overwrite the existing copy at C:\.
        >
        I THINK this should be easy, but the pain killers I am taking for this
        ruptured disc in my back has me a tad loopy (loopier than normal?)
        right about now. Any guidance (other than 'don't code while takling
        pain killers') is appreciated...
        >
        DB- Hide quoted text -
        >
        - Show quoted text -- Hide quoted text -
        >
        - Show quoted text -

        Comment

        • Steve

          #5
          Re: Clone data...

          Programatically create an mdb file in the folder where you want the copy of
          the backend then use the TransferDatabas e method to import all the tables in
          your backend to the new file.

          PC Datasheet
          Providing Customers A Resource For Help With Access, Excel And Word
          Applications
          resource@pcdata sheet.com






          "DavidB" <jebva@yahoo.co mwrote in message
          news:1184959963 .897179.276650@ g4g2000hsf.goog legroups.com...
          When I use FileCopy in an attempt to make a copy of the BE onto the
          local machine I get an Access Denied error. It looks as if the BE
          cant be copied since the FE that is attempting the copy uses that very
          same back end. Since copying a file that is open at the time can lead
          to all kinds of nasty gremlins, this is not at all surprising. I can
          however already have a copy of the BE (w/o data) on the local machine
          and then merely populate the tables in the 'clone' from the data in
          the 'live' BE via queries.
          >
          >
          On Jul 20, 12:01 pm, DavidB <je...@yahoo.co mwrote:
          >Thank you. Exactly the type and level of assistance I was looking
          >for. I'll jump into the help files and get the code written up to
          >accomplish the task...
          >>
          >On Jul 18, 3:54 pm, "Steve" <So...@private. emailaddresswro te:
          >>
          >>
          >>
          Look at the Dir function in the Help file for checking if a copy of the
          BE
          already exists at C:\. Look at the FileCopy statement to create a
          clone.
          >>
          The FE will still be linked to the BE on the server. If you want to
          relink
          to the clone, look at TableDefs and Connection String in the Help file.
          >>
          PC Datasheet
          Providing Customers A Resource For Help With Access, Excel And Word
          Applications
          resou...@pcdata sheet.com
          >>
          "DavidB" <je...@yahoo.co mwrote in message
          >>
          >news:118478803 4.831836.125110 @z28g2000prd.go oglegroups.com. ..
          >>
          >I have a situation where a user needs to clone an existing BE database
          (stored on a server) to his local machine. Assume the followings...
          >>
          User goes into the database FE which has linked BE. BE is stroed on
          a
          server.
          User needs to be able to click a button on the FE that will clone the
          copy of the BE on the server to C:\.
          If a copy of the BE already exists at C:\, the clone process should
          overwrite the existing copy at C:\.
          >>
          I THINK this should be easy, but the pain killers I am taking for
          this
          ruptured disc in my back has me a tad loopy (loopier than normal?)
          right about now. Any guidance (other than 'don't code while takling
          pain killers') is appreciated...
          >>
          DB- Hide quoted text -
          >>
          - Show quoted text -- Hide quoted text -
          >>
          >- Show quoted text -
          >
          >

          Comment

          • Tony Toews [MVP]

            #6
            Re: Clone data...

            DavidB <jebva@yahoo.co mwrote:
            >When I use FileCopy in an attempt to make a copy of the BE onto the
            >local machine I get an Access Denied error. It looks as if the BE
            >cant be copied since the FE that is attempting the copy uses that very
            >same back end.
            You need to close all forms and recordsets (and unlikely but reports too) which are
            bound to the backend. You likely have a form which is open agains the backend for
            performance purposes.

            You can verify that all such are closed when there is no longer an .ldb file against
            the backend.
            >I can
            >however already have a copy of the BE (w/o data) on the local machine
            >and then merely populate the tables in the 'clone' from the data in
            >the 'live' BE via queries.
            You could but you'd have to do this in relational sequence. That is parent tables
            first, then child tables and child of child tables. If that makes sense.

            Tony
            --
            Tony Toews, Microsoft Access MVP
            Please respond only in the newsgroups so that others can
            read the entire thread of messages.
            Microsoft Access Links, Hints, Tips & Accounting Systems at

            Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

            Comment

            Working...