Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
    Bookmark Topic Watch Topic
  • New Topic

jsp error

 
kanan devi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
<%
try
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://database:1433","sa","123");
Statement st3=conn.createStatement();
String sql3 = "SELECT * FROM tab.dbo.polledresult";
ResultSet rs3=st3.executeQuery(sql3);
rs3.next();

que=rs3.getString("lastques");
bs=rs3.getString("res2");
cs=rs3.getString("res3");
ds=rs3.getString("res4");
as=rs3.getString("res1");

%>
<% if(question != null)
<applet code="swiftchart.class" width="249" height="200">
<param name="chart_type" value="bar3d">
<param name="x_value" value="a,b,c,d">
<param name="s1_value" value="<%=as%>,<%=bs%>,<%=cs%>,<%=ds%>">
<param name="s1_label" value="poll">
</applet>
%>
<%
st3.close();
rs3.close();
conn.close();
}
catch(Exception ex)
{
System.err.println("Error: " + ex );
out.println(ex.getMessage());
}
%>
<% session.setAttribute("insertTag","false"); %>
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate post.
http://www.coderanch.com/forums/
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!