Print Page | Close Window

Access to SQL conversion error

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=12426
Printed Date: 04 April 2026 at 5:36pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Access to SQL conversion error
Posted By: oweh
Subject: Access to SQL conversion error
Date Posted: 03 November 2004 at 3:41am

When converting from Access to SQL using DTE i get some errors.

For example one row fails in tblAuthor with the error message:
Cannot insert duplicate key in object 'tblAuthor'

Is there some tables i SQL database that doesent allow duplicate keys that Access does?

 




Replies:
Posted By: WebWiz-Bruce
Date Posted: 03 November 2004 at 4:13am
There shouldn't be, but check that only the ID field, username, and user_code fields are set to unquie.

Also check you haven't got two users with the same username.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: michael
Date Posted: 03 November 2004 at 9:40am
most of the time you have that problem if you do not enable identity insert, a blank database already has guest and administrator, so in oder to "overwrite" those enable identity insert and delete all records when using DT

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Emiliano
Date Posted: 03 November 2004 at 10:29am

Originally posted by michael michael wrote:

a blank database already has guest and administrator, so in oder to "overwrite" those enable identity insert and delete all records when using DT

Yep! I just did it this weekend and it's exactly what michael wrote!

You should delete all records from the newly created tables (some of them are created with some records), enable identity insert and follow a logical order! For example, if you delete the records from tblGroup, you should insert the new group records before inserting the users...

This error you got must have occurred because of the default Administrator and Guest accounts...




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net