3 Replies Latest reply on Jun 30, 2014 8:23 AM by philmodjunk

    How to pass Some fields from one database to a second

    NormanSaxon

      Title

      How to pass Some fields from one database to a second

      Post

           Need help with this:

           I have a database of students

           Stdent.db fields

           First Name

           Last Name

           Student number

           Year Started

           Year finished

            

           I need to be able to call up the student and pass some fields to a second database

           RA.db fields:

           FName

           LName

           StudentNo

           CourseNo

           Hours

            

           I need for a few of the filed from the Stdent.db to fill in the fields of the RA.db

      FName  = First Name

      LName  = Last Name

      StudentNo = Student  number

           CourseNo = user entry

           Hours = user entry

           Then add the recored to the RA.db

            

           I just can’t get the three items from the first db to pass to the send db

            

        • 1. Re: How to pass Some fields from one database to a second
          philmodjunk

               What you describe, copies data from one database table to another table. And the process is essentially the same whether the tables are in the same file or different files.

               But why do you need to copy the data? Much of the time, such data from the related table simply needs to be correctly displayed on a layout based on the other table and this does not require that you copy over the data into a set of matching fields, you simply take advantage of a defined relationship to display the data from the related record in the other table. Copying the data can create issues should any of the copied data later change in the original table--such as a student changing their name--you then have to find and update the copied data in the second table or you now have a data discrepancy in your system.

          • 2. Re: How to pass Some fields from one database to a second
            NormanSaxon

                 Thanks for the quick response

                 I need to do it this way because the second temp (RA.db) will be used to create a .CSV file to be used by another program. After that; the .CSV file and the RA.db file will be cleared of data and start over in the next term.

                  

                 Basically what is going on is that a student is searched, when found in the student databass we click a button to add the information to the RA.db along with user entries  Once all the students are selected the RA.db is dumped to a .CSV file then the RA.db file is then cleared of data. One student could have been selected several times

            • 3. Re: How to pass Some fields from one database to a second
              philmodjunk
                   

                        I need to do it this way because the second temp (RA.db) will be used to create a .CSV file to be used by another program.

                   You do not need to do it this way to export the data to a CSV file. Your export can combine date from two or more related tables to produce the needed rows of comma separated values in your exported file. While what you describe can work and be set up via an Import records step to copy data from a found set in one table to another prior to exporting, it's not necessary and greatly complicates the steps taken to do it.