• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

developing jsp page using cewolf

 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am a newbie to charts currently i am a developing a bar chart in jsp page with cewolf tag libraries but i am struggling with database connectivity i am using mssql in my system i do not know how to retrieve the code with cewolf can you please post me sample code how to connect with mssql.
Thanks in advance.
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to javaranch

Here is the link for jdbc mysql which may help you...

http://www.developer.com/java/data/article.php/3417381

However, here is some code snippet that might help you.


 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanks for your response i have connected to mssql database but i am little bit confused how to retrieve dataset from database i am sending my code please help me how to retrieve data correctky
Thanks in advance.
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is happening after you run your code ? Are you getting any exceptions ?

I will suggest you to have a look at the below hyperlink

http://www.vsj.co.uk/articles/display.asp?id=738
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like the code is adding states and countries alternately to the Dataset. That doesn't make much sense - a pie chart consists of categories and values (which determine the size of the pie slice). What is it, exactly, that you want to show in the chart?
Here's an example of a pie chart Dataset producer:
 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
when i run the code it is not displaying pie chart even not giving exception simply it is displaying arrow mark in the place of image in the jsp page.I think adding dataset object is the problem. Any suggestions will greatly welcome.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I said, the code you posted doesn't do anything useful that would create a pie chart. Try the code I posted instead.
 
vina kum
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have your code in import statement no problem with loading drivers.I have written the code by using cewolf tags.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't tell from your last post if the problem is solved, or what exactly you tried and what the result of that was.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic