Access 97 Data to SQL

G

Guest

I have an Access 97 program that for many years linked to tables in another
database through drive letter access. Recently, because of speed, we
converted the Access tables to a SQL Server 2000 database and linked the
tables via an ODBC connection.

The program can read the tables but there are several problems. The append
queries that are trying to build new records in one of the SQL tables keep
giving a key violation error. Also, a few of the screens used to append
records to some of the tables no longer let me add records. It will show the
records that were originally imported, and let me delete them, but not add.

The first time I converted, many of the Access queries wouldn't work and we
discovered that in the conversion, the Autonumbering in many of the tables
got lost. Since then, I have set the Identity to Yes and when viewing the
design of the ODBC tables through Access, they are now showing as Autonumber.

Is there some incompatibility between Access 97 and SQL server 2000, or do I
have the wrong data types in the SQL tables? Is there something wrong with
the way I set up Autonumbering in SQL? When the data was all in Access, I
had no problem appending records, but now that the data is in SQL..... what
am I missing?

Please help!

Thanks,

Dianne
 
G

Guest

You should check the keys in the tables in the SQL DB, if you export all the
tables from Access to the SQL, it will export the table with the data but
wouldn't define keys and indexes, if no key is define then access wouldn't
let you add new records.

If that the case, define the keys, refresh the link to access and try.
 
G

Guest

Thanks! I did have to set some keys, but the key violation error had to do
with a Yes/No column that had no default value. Couldn't believe how long it
took me to find the problem, but everything is fine now.

Dianne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top