[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    loading return values from query into bean
From:       "Agrawal, Anuj (Anuj)** CTR **" <agrawal () lucent ! com>
Date:       2002-02-15 21:34:40
[Download RAW message or body]

I'm executing a query using the db taglib.

But i'm not sure if there is an automagical way of loading the resultset
values (assume just one and only one record is returned) into a bean with
similar properties.  I tried the following code snippet which failed
miserably.

	<sql:statement id="stmt2" conn="conn1">
		<sql:query>
			select field1, field2, field3
			from tblName
			where field2 = <%= request.getParameter("someParam")
%>
		</sql:query>
		<sql:resultSet id="rset2">
			<jsp:useBean id="mybean" scope="page"
class="MyBean"/>
			<jsp:setProperty name="mybean" property="*" />
		</sql:resultSet>
	</sql:statement>

Help?
Thanks.

--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic