Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:47:25+00:00 2026-06-03T10:47:25+00:00

Am working on syncing my internal products database with nopCommerce, therefore most products already

  • 0

Am working on syncing my internal products database with nopCommerce, therefore most products already exist in internal db, and I would like to upload them to a SQL Server nop-database.

I want to re-use all PK’s that are in internal DB since it would make it easy for me to match them and automate the sync. It does not allow me to manually add the PK, since the PK is set to autoincrease in the DBMS.

How can i change it so I could add my own PK numbers, but I also want the DB to continue behaving properly if I use the admin CP and add products manually?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T10:47:27+00:00Added an answer on June 3, 2026 at 10:47 am

    To allow primary keys to be set when the column is an identity you need to set identity insert on. Format is

    SET IDENTITY_INSERT [table name] ON
    

    You probably want the identity seed for the DB you are moving these to to be well above any of the primary keys you will be setting manually so you don’t have a conflict

    When you are finished set it back

    SET IDENTITY_INSERT [table name] OFF
    

    http://msdn.microsoft.com/en-us/library/ms188059.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on syncing my MySql database on two computers (using dropbox with
I am working with a client who is syncing between SQL Server and MySQL
I am working on a sync solution for my app, and I would like
Working on a website that has Employee and Branch entities, using a database table
Working on a movie website and would love to find an API that I
Working on joining up two legacy DB systems into new database where I can
I'm working on a cocoa app for syncing data between two folders. It have
I am designing a file syncing application (like DropBox). The client keeps a persistent
We have a software solution that involves syncing some data between a Progress database
An app I'm working on stores the user's info for syncing with a webservice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.