Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Access to SQL conversion error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Access to SQL conversion error

 Post Reply Post Reply
Author
oweh View Drop Down
Newbie
Newbie


Joined: 03 July 2003
Location: Sweden
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote oweh Quote  Post ReplyReply Direct Link To This Post Topic: Access to SQL conversion error
    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?

 

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Emiliano View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote Emiliano Quote  Post ReplyReply Direct Link To This Post 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...

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.