Sorry Guys!!! It's Fixed!!! The code works!!!

But I got a new issue, how can I execute the code in the script tab just once ?
The code has been executed how many times I got in my result set from the source.



Hi everyone!

I was trying to execute a routine to make an insert after finish my process.

Is that possible ?

The code is below:

************************************************** **********************
// This script executes once after a message has been processed
var dbConn = DatabaseConnectionFactory.createDatabaseConnection ('net.sourceforge.jtds.jdbc.Driver','jdbc:jtds:sql server://address:1433/database','sa','password');

var params = new;

var expression = "INSERT IGNORE INTO AcquiredDataSent (AdsAcqID, AdsDateSent) VALUES (?, GETDATE())";
var result = dbConn.executeUpdate(expression, params);;
logger.error('message: ' + result);
************************************************** **********************

the script is configured as postprocessor.

Follow below the error message

************************************************** **********************
ERROR-406: JDBC Connector error
ERROR MESSAGE: Error writing to database:
org.mozilla.javascript.WrappedException: Wrapped java.sql.SQLException: Could not find stored procedure 'expression'. (af218145-21ac-46e2-a5cd-c6fa56feaeaf#3)
at org.mozilla.javascript.Context.throwAsScriptRuntim eEx(
at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:157)
at org.mozilla.javascript.optimizer.OptRuntime.call1(
at org.mozilla.javascript.gen.c23._c6(af218145-21ac-46e2-a5cd-c6fa56feaeaf:3)
at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(
at org.mozilla.javascript.gen.c23._c0(af218145-21ac-46e2-a5cd-c6fa56feaeaf:8)
at org.mozilla.javascript.ContextFactory.doTopCall(Co
at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr
at org.mozilla.javascript.gen.c23.exec(af218145-21ac-46e2-a5cd-c6fa56feaeaf)
************************************************** **********************

seems that my implementation wasn't recognized.

Does someone already did that before ?

Thanks a lot. :whistle:

Post edited by: Alexander, at: 11/19/2007 21:40

Post edited by: Alexander, at: 11/19/2007 22:44

Post edited by: Alexander, at: 11/19/2007 22:45