Options

Error: Arg Exception - Item has already been added

JoshCrosbyJoshCrosby Posts: 8
edited December 16, 2004 1:02PM in SQL Toolkit Previous Versions
Have a problem with my program, i wrote a command prompt program to script the databases on a server. it's pretty much based off of one the samples.

Everything works great until i get to one of my servers it blows up and throws an error "Item has already been added". the only diference between this server and the others is this one is in Binary.

Has anyone seen this before?

Thanks :lol:
Josh Crosby

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi Josh,

    Thanks for your post. The first thing I would try is to use the 'treat items as case sensitive' option when registering the second database. This will prevent items that have the same case-insensitive name from being indexed by name and causing the duplicate key error.

    You can enable this option in a Toolkit project by bitwise OR-ing it to the default comparison options like so:
    //C#
    Options enOptions=Options.Default | Options.CaseSensitiveObjectDefinition
    
  • Options
    Thanks a ton Brian that worked perfectly
    Josh Crosby
This discussion has been closed.