Hi!

I have an IDM enviroment with eDir connected to MS-SQL, And I must work
with some attributes that are dates,
My problem is in Metadirectory this attributes are Strings , and in
MS-SQL are smalldate type.
How i can transform data between this types ?

I try convert meta date string to format that MS-SQL accept , but
doesn't run:


<rule>
<description>Modificar fecha FooFSitLaboral</description>
<conditions>
<and>
<if-class-name mode=\"nocase\"
op=\"equal\">hnlogin</if-class-name>
<if-operation mode=\"case\" op=\"equal\">add</if-operation>
</and>
</conditions>
<actions>
<do-trace-message level=\"3\">
<arg-string>
<token-text xml:space=\"preserve\">Data : </token-text>
<token-op-attr name=\"DataInici\"/>
</arg-string>
</do-trace-message>
<do-set-local-variable name=\"var_dataInici\" scope=\"policy\">
<arg-string>
<token-op-attr name=\"DataInici\"/>
</arg-string>
</do-set-local-variable>
<do-reformat-op-attr name=\"DataInici\">
<arg-value type=\"time\">
<token-substring length=\"4\">
<token-local-variable name=\"var_dataInici\"/>
</token-substring>
<token-text xml:space=\"preserve\">-</token-text>
<token-substring length=\"2\" start=\"4\">
<token-local-variable name=\"var_dataInici\"/>
</token-substring>
<token-text xml:space=\"preserve\">-</token-text>
<token-substring length=\"2\" start=\"6\">
<token-local-variable name=\"var_dataInici\"/>
</token-substring>
</arg-value>
</do-reformat-op-attr>
<do-trace-message level=\"3\">
<arg-string>
<token-text xml:space=\"preserve\">Data : </token-text>
<token-op-attr name=\"DataInici\"/>
</arg-string>
</do-trace-message>
</actions>
</rule>


Error is :
DirXML Log Event -------------------
Driver: \METADIR_LAB\foo\Serveis\DrvSetMetadir\idm2hnlogin
Channel: Subscriber
Object: \METADIR_LAB\foo\Q-Personal\auTest005
Status: Error
Message: <description>Unable to add object. Unable to insert row
into table/view 'hnlogin'. Unable to convert directory time value
'2008-01-01' to type 'java.sql.Timestamp'.</description>


--
arturnebot
------------------------------------------------------------------------
arturnebot's Profile: http://forums.novell.com/member.php?userid=26694
View this thread: http://forums.novell.com/showthread.php?t=346278