accessing a 2nd db using code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rudeman76
    New Member
    • Oct 2007
    • 58

    accessing a 2nd db using code

    Hi again,

    I am trying to open a second DB from a form on the 1st DB. What I want to do is at the end of the week, take the info from the 1st Db and add it to another DB. deleting all the info from the 1st one so the users start with a fresh DB every week. also, once the admin user is logged in, I want them to only be able to access the 2nd db and not the 1st.

    Andrew
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Originally posted by rudeman76
    Hi again,

    I am trying to open a second DB from a form on the 1st DB. What I want to do is at the end of the week, take the info from the 1st Db and add it to another DB. deleting all the info from the 1st one so the users start with a fresh DB every week. also, once the admin user is logged in, I want them to only be able to access the 2nd db and not the 1st.

    Andrew
    I would split the database in a frontend and a backend (See tools/database/splitting). Now duplicate the backend so you have a "weekly" and a "saved all" one.
    Create a frontend for the users only linked to the "weekly" backend.
    Create a frontend for the admins only linked to the "saved all" backend.
    Create a manager frontend having links to both backends. In this frontend you create the append queries to "move" the data to the "saved all" tables and the "delete *" queries to empty the "weekly" tables.

    Idea ?

    Nic;o)

    Comment

    • rudeman76
      New Member
      • Oct 2007
      • 58

      #3
      thanks,

      I will give it a try

      Andrew

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        Keep me posted :-)

        Nic;o)

        Comment

        • rudeman76
          New Member
          • Oct 2007
          • 58

          #5
          All your advice worked awesome. Thank you. I would probably still be fighting with trying to figure it out. Thanks a lot.

          Andrew

          Comment

          • nico5038
            Recognized Expert Specialist
            • Nov 2006
            • 3080

            #6
            Glad I could help, success with your application !

            Nic;o)

            Comment

            Working...