Hi Jasmin,
I did the following
select * from table1 ?
selected the parametrized option and enabled the following.
Index = 1
Type = String
Value = /process_data/@WhereClause
The variable is set before it is passed to the query.
and my whereclause is initialized to value like this
concat("where folderId = ", /process_data/@FolderId, " and tp = '", /process_data/@TechPackNum, "'")
java.lang.RuntimeException: Incorrect syntax near '@P0'.
at com.adobe.idp.dsc.jdbc.helper.PreparedSqlHelper.executeTestQuery(PreparedSqlHelper.java:118)
....
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '@P0'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
I infact tried a wierd option of enclosing the whole query in a string like
"select * from table1 ?";
and provided the same parametrized options, however the erro is different
java.lang.RuntimeException: The index 1 is out of range.
at com.adobe.idp.dsc.jdbc.helper.PreparedSqlHelper.executeTestUpdate(PreparedSqlHelper.java:159)
...
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The index 1 is out of range.
I know am missing something pretty simple, or is it just something to do with MSSQL ?