cancel
Showing results for 
Search instead for 
Did you mean: 

MDO: SQL-Error with TimeStamp

thomas_mader3
Explorer
0 Kudos

Hello,

I'm dealing with MDO's - it's working fine but actually I have a problem with a TimeStamp-Field.

com.sap.xmii.Illuminator.logging.LHException: com.sap.sql.log.OpenSQLException: Failed to set the parameter 11 of the statement >>UPDATE MDO592 SET FIELD18 = ?,FIELD19 = ?,LASTQUERYEXECUTION = ?,LASTQUERYEXECUTIONBY = ? WHERE FIELD3 = ? AND FIELD16 = ? AND FIELD17 = ?  AND FIELD6 = ? AND FIELD13 = ? AND FIELD5 = ? AND FIELD38 <= ?<<: Cannot assign an object of type >>java.lang.String<< to a parameter with JDBC type >>TIMESTAMP<<.

I've tried to assign a timestamp with "datenow" => same error.

Other case "datefromxmlformat(datenow, Query.DateFormat) => same error.

Any Ideas?

We are on MII 15.0, SP 4, Patch 13

Thank in advance.

Accepted Solutions (1)

Accepted Solutions (1)

former_member196557
Active Contributor
0 Kudos

HI Thomas,

Open the Parameters list for your MDOQuery. For each Parameter defined you can also define an explicit Parameter Type. Click on the Parameter Type field and select the DateTime type from the drop down list. I would recommend that you explicitly type each Parameter used in any MDOQuery so that there are no "surprises" when using the MDOQuery later. NOTE: the default Parameter Type is String even though it is not shown initially in the field.

Regards, Steve

thomas_mader3
Explorer
0 Kudos

Hello,

Thank you so much - issue solved.

Thomas

Answers (0)