• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Plotting DB data on Internet

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a project that I'm not sure how to approach, so I thought you guys might have some ideas.
OK, here goes...
I have to plot some data from an MS Access (and in the future, SQL Server) DB on the Internet. The data is simple sales numbers or similar, it just wants showing in bar charts or something.
The trouble is, I don't know the best (/easiest) way to do this.
I'd thought I could just have an applet that connects with JDBC to the data source and plots accordingly, but on reading the docs it seems that the JDBC-ODBC bridge is unsuitable cos you have to configure ODBC on the client, have a signed applet, and not all browsers support it.
We could buy a proper JDBC driver, but they seem quite expensive and we'd need a new one when the DB moved from Access to SQL Server.
I could pass all the data as <PARAM>s to the applet, but the page would need reloading when you wanted to view different data (eg. zoom in or scroll through it). This is possible with JavaScript and ASP or similar but it might be a bit messy.
Another way I was thinking of was to have a Java prog run on the server, drawing the image for the web page to load according to parameters passed from an ASP page or something. I don't think it would be hard to launch an app from an ASP page, but I'm not sure if the web page could be made to wait for the image to be drawn. Perhaps some JavaScript could do this. As the app is on the server, there wouldn't be a problem reding from the DB with JDBC-ODBC. Also the image would have to be saved as a GIF (or JPEG) - is this possible?
The last option would be to buy something that did this already, as an applet or ActiveX control. Anyone know of anything that would do the job?
OK, I think that's about it. Any thoughts?
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello!
The experience i had in this field was a project for develloping a web site for an invest bank. They wanted to show pipe graph representing shares of a client. We work with a servlet that retrieve the data from the database. Then the data was reformatted and a mpeg was created on a temporary directory. The url of this file was put in the http session and finally displayed by the Jsp on which the request was forwarded. This temporary directory was attach to the session and destroy when this died.
I was worrying about the creation of the mpeg file. But it's quite fast and the deletion of file works well using an unbindingEvent.

------------------
Benjamin l�onard
www.evisor.com
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're going with servets then the content type you return can be the mpeg (or image or whatever) itself rather than doing the 'temp file' thing.
If you head over to the Servlet/JSP forum there'll be more info.
There are jave packages out there to create GIF and JPEG images as well
Dave.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry you are right but i forget to say that the library i use to create the charts was only able to create a file. So i was oblige to do it like this. But i suppose there are other libraries that are doing the job better!
------------------
Benjamin l�onard
www.evisor.com
 
Hey! You're stepping on my hand! Help me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic