You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Datta Saru (JIRA)" <ib...@incubator.apache.org> on 2006/09/05 07:15:22 UTC

[jira] Created: (IBATIS-341) Element "sqlMap" does not allow text.

Element "sqlMap" does not allow text.
-------------------------------------

                 Key: IBATIS-341
                 URL: http://issues.apache.org/jira/browse/IBATIS-341
             Project: iBatis for Java
          Issue Type: Task
          Components: SQL Maps
         Environment: WindowsXP,SapDB(database), Myeclipse5.0
            Reporter: Datta Saru
         Attachments: errors.txt

I have written a simple Dynamic sql query that should be able to fetch a record that matches the criteria like:
<select id="getEmployee" resultMap="get-employee-result">
		SELECT * FROM MYIBATISEMP
		<dynamic prepend="WHERE">
			<isNotEmpty property="empNo">
			  empno = #empNo#
			</isNotEmpty>
		</dynamic>
	</select>
and the corresponding Java code is:
Employee emp =(Employee)sqlMap.executeQueryForObject(
		"getEmployee",empNo); 
        System.out.println("Employee No = " + emp.getEmpNo());
        System.out.println("Dept Name = " + emp.getDName());                I am sending error as an attachment . Plz look into the issue and can you please me some good tutorials&examples for Dynamic Sqlmaps which shud contain syntax and examples........Help me
        

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira