easy.. just do <sql:getColumn position="1" to="field1" scope="page" /> <% int field1 = ((Integer)pageContext.getAttribute("field1")).intValue(); %> All primative types gets translated to their appropriate wrappers. Its in the docs for the to/scope of sql:getColumn -Tim
-----Original Message----- From: Igor Bursin [mailto:[EMAIL PROTECTED]] Sent: Monday, July 15, 2002 12:25 PM To: Tag Libraries Users List Subject: Re: db taglibs questions Yes, <sql:getColumn position="1" to="field1" scope="page" /> <%= pageContext.getAttribute("field1") %> it's ok, but if i'll write <% int field1=pageContext.getAttribute("field1"); %> I'll get next errors: Can't convert java.lang.Object to int, If i'm using db taglib from coldbeans software i'll can write: <sql:setQuery id="query1" query="select A,B from T" res="B" /> <sql:getColumn res="B" position="1" id="C" /> A=<%=C%> Can I make same with the jakarta db tablibs? ----- Original Message ----- From: "Mader, Steve" <[EMAIL PROTECTED]> To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]> Sent: Monday, July 15, 2002 7:18 PM Subject: RE: db taglibs questions > > Use the "to" property of the getColumn tag (see doco). > > e.g. <sql:getColumn position="1" to="field1" /> > > You can also use the optional scope parameter to set the scope. > > e.g. <sql:getColumn position="1" to="field1" scope="page" /> > > I think it defaults to page scope (others are request,session,....), which > means you'd use the pageContext.getAttribute() method to extract the value > (pageContext.getAttribute("field1")). Hope this helps. > > Steve > > -----Original Message----- > From: Igor Bursin [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 15, 2002 10:53 AM > To: Tag Libraries Users List > Subject: Re: db taglibs questions > > > Hello, Kevin. > I do not need to show results sql query through web. I want to write down > results of sql query in variables that further them to use... > > ----- Original Message ----- > From: "Kevin Passey" <[EMAIL PROTECTED]> > To: "'Tag Libraries Users List'" <[EMAIL PROTECTED]> > Sent: Monday, July 15, 2002 6:31 PM > Subject: RE: db taglibs questions > > > > Igor, > > > > Here is some of my code that displays database stuff in a table - I've > only > > given the row > > > > <TR> > > <td><sql:getColumn position="1"/></td> > > <td><sql:getColumn position="2"/></td> > > <td><sql:getColumn position="3"/></td> > > <td><sql:getColumn position="4"/></td> > > <td><sql:getColumn position="5"/></td> > > <td><sql:getColumn position="6"/></td> > > <td><sql:getColumn position="7"/></td> > > <td><sql:getColumn position="8"/></td> > > <td><sql:getColumn position="9"/></td> > > <td><sql:getColumn position="10"/></td> > > <td><sql:getColumn position="11"/></td> > > <td><sql:getColumn position="12"/></td> > > <td><sql:getColumn position="13"/></td> > > <td><sql:getColumn position="14"/></td> > > </TR> > > > > Hope this helps > > > > Regards > > > > Kevin Passey > > > > -----Original Message----- > > From: Igor Bursin [mailto:[EMAIL PROTECTED]] > > Sent: 15 July 2002 15:06 > > To: [EMAIL PROTECTED] > > Subject: db taglibs questions > > > > > > Hello! > > I'm using DBTags Tag library. > > I executes simple query: > > <sql:statement id="stmt1" conn="conn1"> > > <sql:query> > > select string_value, number_value from my_table > > </sql:query> > > </sql:statement> > > How i can output result: > > <sql:setColumn position="1"> to the string or int variable (not to JSP > > directly) ? > > (i try <% A= <sql:setColumn position="1"> %>, but get error) > > > > Best regards, Igor Bursin. > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>