Dear All,
I am using jstl sql tag for fectching data from a access database using odbc:
jdbc driver
here is the code:
[code]
<%@ taglib prefix="c" uri="/WEB-INF/tlds/c-1_0.tld"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<sql:setDataSource driver="sun.jdbc.odbc.JdbcOdbcDriver" url="jdbc:odbc:msd" user="softvijay" password="softpower" />
<sql:query var="result" >
select empname from emp
</sql:query>
<TABLE BORDER="1">
<c:forEach var="row" items="${result}">
<TR>
<td><c:out value="${row.empname}"/> </td>
</TR>
</c:forEach>
</TABLE>
The problem is that i am getting error message as "javax.el.PropertyNotFoundException: Property 'empname' not found on type java.lang.String"
although there is a field in table 'emp' with name 'empname'
what is the cause ?
need help
regards
vijay