Hi
Could you resend the modified piece of code again so that I can view it ....
> Hi ,
> I have tried to do as you telled me but nothing to changen ....
> if you have other idea please tell me ....
>
> SE>Hi
>
> SE>I am not certain if this solution will work or not but you could try
> SE>removing
> SE>the statment ResultSet rs = null
>
>
>
> SE>> Hi All,
> SE>> I am a newer JSP, when I try to connect Database
> SE>> throught Bean and get ResultSet and out put in option
> SE>> list successfully but It has error when I assign the
> SE>> result to String variable .
> SE>> Pealse give me suggest
> SE>> Ex1: (successful)
> SE>> <% ResultSet rs = db.execSQL(sql); %> <!- - db is ID of MyBEAN - ->
> SE>> <%while(rs.next()) %>
> SE>> <%= rs.getString(1) %>
> SE>>
> SE>> Ex2: (Unsuccessful)
> SE>>
> SE>> <%! String str ;
> SE>> ResultSet rs = null; %>
> SE>> <% rs = db.execSQL(sql);
> SE>> if (rs.next())
> SE>> str = rs.getString(1);
> SE>> else
> SE>> str = "qqqqqqqqqqqqqqq";
> SE>> %>
> SE>> it always error when I insert assign operator in my JSP
> SE>> page
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to servlets as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-servlets-$subst('Recip.MemberIDChar')@p2p.wrox.com