Solved

Access 97 Back end Update

Posted on 2014-01-13
4
492 Views
Last Modified: 2014-01-13
Good Morning All,
          I have recently finished updating the front end of my companies database. To bring things in line with what they wanted I have had to add fields to some of the back end tables. Now I find my self almost ready to go live and stuck on how to move the current data in to the new tables. I have tried using different query but I'm new at Access 97 so I'm sure i'm missing something. i'm getting key violations on the append query which looks like the one I should use. please help.
                                 Thank you for your time
                                                            DWG
0
Comment
Question by:Denthion
4 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39776688
Don't know whether the backend has any relationships defined, but if it does, then you must load the tables in the proper order.  Those tables on the one side of one-to-many relationships must all be loaded first, otherwise, you will get those foreign key errors.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 39777048
New at Access 97???  That version is almost 20 years out of date.  I suggest upgrading to Access 2010.  Much work will need to be done to upgrade code, but it should be done now, as you may not even be able to open Access 97 databases in current Access versions before long.
0
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39777444
Access 97 is an oldy but a goody but I agree with Helen.  It's time to come into this century and I would do it with A2010 if at all possible.  I don't even know if you can still buy it but if you can, you should get it while it is still available since A2013, which is the current version can no longer read A97 databases at all.  I guess MS couldn't get people to give up A97 and so they decided to force the issue.

How to convert the data depends a lot on the type of changes you made.  If it was basically adding columns, changing column definitions, adding/deleting indexes, you can use DDL queries to make the old database conform and not have to reload all the tables.

Look up Data Definition Language in Access help (from a code window NOT from the GUI) or on the Web for examples of the types of queries you will need to create.  Here's an example to add a column to a table:

ALTER TABLE Employees ADD COLUMN Notes TEXT(25)

You can add multiple columns at once.

Here's another to change a column definition:

ALTER TABLE Employees ALTER COLUMN ZipCode TEXT(10)

Here's an example that is more complicated.  It is in VBA but it doesn't have to be.  You can just create the query directly.

This example creates a new table called MyTable with two text fields, a Date/Time field, and a unique index made up of all three fields.



VBA


Sub CreateTableX2()
 
    Dim dbs As Database
 
    ' Modify this line to include the path to Northwind
    ' on your computer.
 
    Set dbs = OpenDatabase("Northwind.mdb")
 
    ' Create a table with three fields and a unique
    ' index made up of all three fields.
    dbs.Execute "CREATE TABLE MyTable " _
        & "(FirstName CHAR, LastName CHAR, " _
        & "DateOfBirth DATETIME, " _
        & "CONSTRAINT MyTableConstraint UNIQUE " _
        & "(FirstName, LastName, DateOfBirth));"
 
    dbs.Close
 
End Sub
0
 

Author Closing Comment

by:Denthion
ID: 39777710
Thank you, This is the kind of information i was looking for.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question