We help IT Professionals succeed at work.

ACCESS frontEnd SQL BackEnd key field

75 Views
Last Modified: 2018-09-18
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?
Comment
Watch Question

ste5anSenior Developer
CERTIFIED EXPERT

Commented:
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 GroggSecurity Management InfoSec

Author

Commented:
So what we are saying is that we have to save the record and then pull it after the .update/.add (saverecord) action?
Senior Developer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Ernest GroggSecurity Management InfoSec

Author

Commented:
great.  I am going to try a few things to see if I can pull the data and then insert it.
Jim Dettman (EE MVE)President / Owner
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2017

Commented:
<<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 GroggSecurity Management InfoSec

Author

Commented:
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.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.