I'm trying to test a simple database connector. I'm using the SQL Server/Sybase driver and have gotten as far as a valid connection. However the following SQL is generating an error:
INSERT IGNORE INTO usr (
usruid, usrnam, usrpwd, usracc, usrdiv, usrsts,
usrlpcr, usrcnb, usreml, usrphn, usrpwh, usrtyp,
usrctyp, usrtlid
) values (
'joe', 'joe user', ' ', 0, 123, ' ',
'${date.get('yyyy-MM-dd')}', 'WMSVISION', '[email protected]', ' ', ' ', 'EMPL',
' ', 'en_US - English')
The error that is occurring is:
java.sql.SQLException: Invalid parameter index 1. Query: INSERT IGNORE INTO usr (
usruid, usrnam, usrpwd, usracc, usrdiv, usrsts,
usrlpcr, usrcnb, usreml, usrphn, usrpwh, usrtyp,
usrctyp, usrtlid
) values (
'joe', 'joe user', ' ', 0, 123, ' ',
'?', 'WMSVISION', '[email protected]', ' ', ' ', 'EMPL',
' ', 'en_US - English')
Parameters: [2007-07-13]
--------------------
I've tried using a date escape of {d '${date.get('yyyy-MM-dd')}'} but that only changes the error to:
java.sql.SQLException: Invalid JDBC date escape at line position 181.
SimpleDbconnect.xml (4872 bytes)
INSERT IGNORE INTO usr (
usruid, usrnam, usrpwd, usracc, usrdiv, usrsts,
usrlpcr, usrcnb, usreml, usrphn, usrpwh, usrtyp,
usrctyp, usrtlid
) values (
'joe', 'joe user', ' ', 0, 123, ' ',
'${date.get('yyyy-MM-dd')}', 'WMSVISION', '[email protected]', ' ', ' ', 'EMPL',
' ', 'en_US - English')
The error that is occurring is:
java.sql.SQLException: Invalid parameter index 1. Query: INSERT IGNORE INTO usr (
usruid, usrnam, usrpwd, usracc, usrdiv, usrsts,
usrlpcr, usrcnb, usreml, usrphn, usrpwh, usrtyp,
usrctyp, usrtlid
) values (
'joe', 'joe user', ' ', 0, 123, ' ',
'?', 'WMSVISION', '[email protected]', ' ', ' ', 'EMPL',
' ', 'en_US - English')
Parameters: [2007-07-13]
--------------------
I've tried using a date escape of {d '${date.get('yyyy-MM-dd')}'} but that only changes the error to:
java.sql.SQLException: Invalid JDBC date escape at line position 181.
SimpleDbconnect.xml (4872 bytes)
Comment