Link to home
Start Free TrialLog in
Avatar of military donut
military donutFlag for United States of America

asked on

ACCESS frontEnd SQL BackEnd key field


We have an Access DB that we recently uploaded the tables to SQL Server and we are still using the ACCESS frontend so we are linked to the tables.  I am trying to figure out why the ID field is not populating when a new record is created?

the ID field is the Key field.  In access we still show it to be Field Size: Replication ID and Required.

what am I missing?
Avatar of ste5an
Flag of Germany image

When switching to SQL Server as back-end, there are some important changes.

One of them is: an auto-increment value is no longer available before you save a row. Cause SQL Server can assign it only on the real INSERT action.

See Armen's presentation: The Best of Both Worlds: Access-SQL Server Optimization
Avatar of military donut


So what we are saying is that we have to save the record and then pull it after the .update/.add (saverecord) action?
Avatar of ste5an
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
great.  I am going to try a few things to see if I can pull the data and then insert it.
<<Replication ID>>

 Just as an FYI....did you (or do you still have) replication turned on?    ReplicationID is not a great data type for a PK if your not doing replication as it's a GUID (16 bytes long).

Sorry for not replying...I did have ReplicationID turned on.  I had to turn that off and then change it in SQL to int

got it.