Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Creating an index with ADOX

Creating an index with ADOX

Scheduled Pinned Locked Moved Database
databasehelptutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ijprest
    wrote on last edited by
    #1

    I'm having some trouble creating an index with ADOX (against MSJet as the provider). For the life of me, I can't figure out how to make the index *unique*. Sure, there is a pIndex->PutUnique() function on the Index object, but it doesn't seem to work, since the resulting database still lists the field as "duplicates OK" when I open it in Access. I've also tried 'pIndex->Properties("Unique")->PutValue(true)', but that only results in an exception being thrown (with some unhelpful error message). But PutValue(false) doesn't result in an error. Am I missing some prerequisites for a unique index? If I change the index in Access to "no duplicates" and reopen the database, both the pIndex->GetUnique() and Properties("Unique")->GetValue() return true. Any help is much appreciated.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups