I have IDM set up to sync eDir to ID Vault and then to AD but now I am
looking at using database driver as well. First I had a simple application
that works with MySQL on Linux - basically, synching users one way from eDir
to the database. Everything worked Ok and I did not have to dig too deep to
get it to work.

Now I have got this app running on top of MS SQL 2000 database with user
records having two attributes ( among others ) - UserID and some
Thirdparty_Code. User accounts in eDirectory also have values for those
UserID's in their Title attribute. What I now need is to populate
Thirdparty_Code in the database with CN from eDirectory ( for users with
matching UserID's ).

I do not know much about databases. I tried altering sample driver provided
by Novell, added a copy of my table ( StudDetails ) with users to idm
database and then tried setting up a matching rule :

<do-find-matching-object scope="subtree">
<token-text xml:space="preserve">StudDetails</token-text>
<arg-match-attr name="Title"/>

which I thought might find me a db record with the right Title ( that is
being mapped to UserID in StudDetails table in schema mapping policy :

<attr-name class-name="User">
<attr-name class-name="User">

I also have a single attribute to be 'synced' ( eDir to db on Subscriber )
which is CN ( mapped to Thirdparty_Code which is the one I need to replace
with CN's ). I do not need to add any new db records ( not at this stage at
least ), all users should already be in the database. All I need is to
update their Thirdparty_Code accordingly. To test this I am trying to
'Migrate from ID Vault' a single user. Now my trace looks like this :

Message 1:
Wed Jul 11 12:42:07 EST 2007
<status level="warning">Unable to determine whether retrieval of
auto-generated keys is supported. Defaulting to

Message 2:
Wed Jul 11 12:42:07 EST 2007
<status level="warning">Primary key values taken from an event are useful
only before insertion. Overriding key generation timing from 'after' to
'before' for table/view 'dbo.StudDetails'.<application>DirXML</application>

Message 3:
Wed Jul 11 12:42:08 EST 2007
<status event-id="C-NDS#20070711024206#99#1" level="error"
<description>Unable to add object. Unable to retrieve primary key value(s)
from event. Event missing required value for primary key column
<jdbc:document xml:space="preserve" xmlns:jdbc="urn:dirxml:jdbc">&lt;nds
dtdversion="3.5" ndsversion="8.x">
&lt;product version=" ">DirXML&lt;/product>
&lt;contact>Novell, Inc.&lt;/contact>
&lt;add class-name="dbo.StudDetails" event-id="C-NDS#20070711024206#99#1"
src-dn="\IDM_TREE\EMA\Students\AAAUSER" src-entry-id="33879">
&lt;add-attr attr-name="ThirdParty_Code">
&lt;value naming="true" timestamp="1143179739#181"

Am I doing this completely wrong ? as it seems it is trying to add a new db
record then fails to retrieve pk which it should not even be doing, right ..
as I want it to update an existing one ( which I need to find first ).

There are other ways to achieve this but I guess I'd like it done the hard
( for me ) way. Any ideas are much appreciated, sorry for a lengthy post