View Single Post
  #1 (permalink)  
Old 11-15-2007, 12:47 PM
saurabh.joshi saurabh.joshi is offline
Member
 
Join Date: Aug 2007
Posts: 4
saurabh.joshi is on a distinguished road
How to access array stored in database through JSTL
Hi,

Can I use JSTL for accessing the array elements stored in the database column.
The Scenario is:
I have a user defined type SCORE_DATATYPE(SCORENUMARRAY integer[], SCORENATYPE character(2))
Score_Data is the column name where the SCORE_DATATYPE is stored.

My question is using JSTL can I access the array elements of SCORENUMARRAY in a drop down box?

__________________________________________________ ____________________________
I am using a similar type of code as following:
Quote:
<%@ include file="/html/common/init.jsp" %>


<sql:query dataSource="jdbcostgresql://10.10.33.39:5432/globus_db,org.postgresql.Driver,postgres,marines@1 23" sql="select

\"Array_Test\" from \"testing\" where \"test1\"=0" var="artists"/>

<table>

<c:forEach var="n" items="${artists.rows}"
varStatus="a">

<c:forEach var="item" items="${n}">
<tr>
<td><cut value="${item}"/></td>
</tr>
</c:forEach>

</c:forEach>

</table>
the output is: Array_Test={0,1,2,3}

not the elements of the array, actually the point here is that the var artists is taking the whole array as its value not the individual elements.
__________________________________________________ ______________________________

Please reply, your guidance is needed.

Thanks & Regards,
Saurabh Joshi.

Last edited by saurabh.joshi : 11-15-2007 at 03:18 PM.
Reply With Quote
Sponsored Links