Hi everyone!

I need to put SYSDATE value as a SQL function parameter, called by a
Oracle JDBC driver, but I don't know how to do.
I'm guessing maybe exist a property to be used inside the jdbcaram XML
element, that says to statement processor, to don't use quotes.

Take a look on how the driver calls the SQL functions, inserting a
single quote:

This is the XML with the event:


Code:
--------------------
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<add cached-time="20130327145253.329Z" class-name="User" event-id="IDMSERVER01#20130327145251#2#1:6f5d0338-77ba-4d92-9edb-5ac2ff461a90" qualified-src-dn="O=lab\OU=users\CN=U9999999" src-dn="\LAB-TREE\lab\users\U9999999" src-entry-id="42757" timestamp="1364395971#2"/>
<jdbc:statement event-id="0" xmlns:jdbc="urn:dirxml:jdbc">
<jdbc:sql>ALTER SESSION SET NLS_LANGUAGE= 'BRAZILIAN PORTUGUESE'</jdbc:sql>
<jdbc:call-procedure jdbc:name="CUSTOM.MYFUNCTION">
<jdbcaram jdbc:sql-type="java.sql.Types.VARCHAR">
<jdbc:value>U9999999</jdbc:value>
</jdbcaram>
<jdbcaram jdbc:sql-type="java.sql.Types.VARCHAR">
<jdbc:value>ABC</jdbc:value>
</jdbcaram>
<jdbcaram jdbc:sql-type="java.sql.Types.VARCHAR">
<jdbc:value>ABC_ADMIN_USER</jdbc:value>
</jdbcaram>
<jdbcaram jdbc:sql-type="java.sql.Types.VARCHAR">
<jdbc:value>STANDARD</jdbc:value>
</jdbcaram>
<jdbcaram jdbc:sql-type="java.sql.Types.VARCHAR">
<jdbc:value>Provisioned by IDM</jdbc:value>
</jdbcaram>
<jdbcaram jdbc:sql-type="java.sql.Types.TIMESTAMP">
<jdbc:value>27/03/2013</jdbc:value>
</jdbcaram>
<jdbcaram>
<jdbc:value/>
</jdbcaram>
</jdbc:call-procedure>
<operation-data>
<entitlement-impl id="" name="Perfil" qualified-src-dn="O=lab\OU=users\CN=U9999999" src="UA" src-dn="\LAB-TREE\lab\users\U9999999" src-entry-id="42757" state="1">EBS://Administrao HTML do CRM</entitlement-impl>
</operation-data>
</jdbc:statement>
</input>
</nds>
--------------------


This is the driver engine processing the event:


Code:
--------------------
[03/27/13 11:52:53.625]:ORADRIVER ST:Stripping operation data from input document
[03/27/13 11:52:53.641]:ORADRIVER ST:Unable to process command 'add' while driver is running in schema-unaware mode. Ignoring.
[03/27/13 11:52:53.641]:ORADRIVER ST:Acquired lock on connection 'dedicated0'.
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN Instantiate statement.
[03/27/13 11:52:53.641]:ORADRIVER ST: Allocating statement from connection 4717f87c.
[03/27/13 11:52:53.641]:ORADRIVER ST: Allocated statement 4ad1cc45.
[03/27/13 11:52:53.641]:ORADRIVER ST:END Instantiate statement.
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN Execute SQL.
[03/27/13 11:52:53.641]:ORADRIVER ST:ALTER SESSION SET NLS_LANGUAGE= 'BRAZILIAN PORTUGUESE'
[03/27/13 11:52:53.641]:ORADRIVER ST:END Execute SQL.
[03/27/13 11:52:53.641]:ORADRIVER ST:Closed statement 4ad1cc45.
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN Call stored procedure 'CUSTOM.MYFUNCTION'.
[03/27/13 11:52:53.641]:ORADRIVER ST:{call APPS.FND_USER_PKG.ADDRESP(?,?,?,?,?,?,?)}
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN Set IN, Register OUT parameter(s).
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 1, field '$1', length: 8, value = 'U9999999'
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 2, field '$2', length: 3, value = 'ABC'
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 3, field '$3', length: 14, value = 'ABC_ADMIN_USER'
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 4, field '$4', length: 8, value = 'STANDARD'
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 5, field '$5', length: 25, value = 'Provisioned by IDM'
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 6, field '$6', length: 10, value = '27/03/2013'
[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 7, field '$7', length: 0, value = ''
[03/27/13 11:52:53.641]:ORADRIVER ST:END Set IN, Register OUT parameter(s).
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN Execute procedure.
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN Test for bad connection.
[03/27/13 11:52:53.641]:ORADRIVER ST:END Test for bad connection.
[03/27/13 11:52:53.641]:ORADRIVER ST:Connection is good.
[03/27/13 11:52:53.641]:ORADRIVER ST:BEGIN rollback.
[03/27/13 11:52:53.641]:ORADRIVER ST:ROLLBACK
[03/27/13 11:52:53.641]:ORADRIVER ST:END rollback.
--------------------


That's my problem:

Code:
--------------------
*[03/27/13 11:52:53.641]:ORADRIVER ST: IN @ index 6, field '$6', length: 10, value = '27/03/2013'*
--------------------


I wanna use SYSDATE, that will make Oracle to use the current timestamp
without date transformation problem, that I'm having right now.

Any clue?

Tks!


--
alancota
------------------------------------------------------------------------
alancota's Profile: https://forums.netiq.com/member.php?userid=268
View this thread: https://forums.netiq.com/showthread.php?t=47420