Avatar of Ernest Grogg
Ernest Grogg
 asked on

ACCESS frontEnd SQL BackEnd key field

Hello,

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?
Microsoft AccessMicrosoft SQL ServerSQL

Avatar of undefined
Last Comment
Ernest Grogg

8/22/2022 - Mon
ste5an

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
Ernest Grogg

ASKER
So what we are saying is that we have to save the record and then pull it after the .update/.add (saverecord) action?
ASKER CERTIFIED SOLUTION
ste5an

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Ernest Grogg

ASKER
great.  I am going to try a few things to see if I can pull the data and then insert it.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Jim Dettman (EE MVE)

<<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).

Jim.
Ernest Grogg

ASKER
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.