Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SQLJ interator

Hi

I am try to implement the Java Persistence tutorial sample, but It's not working.

In the following code:

================================

EmployeeIter iter = null;

#sql [ctx] iter = {

select EMPID, FIRST_NAME, LAST_NAME, SALARY

from TMP_EMPLOYEE

};

================================

I got error messages in #sql line:

- SQLJ: Left hand side of assignment does not have a Java type.

- SQLJ: Return type incompatible with SELECT statement: com.sap.sql.sqlj.semantics.TypeProperties$Invalid is not an iterator type

Following the code of iterator:

================================

package tutoper.dao;

#sql iterator EmployeeIter(int EMPID, String FIRST_NAME, String LAST_NAME, java.math.BigDecimal SALARY);

================================

Any suggestion?

TIA

Former Member
Not what you were looking for? View more on this topic or Ask a question