• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help in Dojo connecting Oracle database tables  RSS feed

 
pushpa naga
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using oracle db&jsp

Here is my table:
Stock table : columns are Daily, Weekly,Monthly.

How to connect my oracle table with Dojo &wnt to display column charts.

Here is my JSP file called Report.jsp

If i hard code the data from table,i'm getting column charts.

Unable generate column chats dynamically.
Please help me the step how to connect my oracle table with dojo.

Much appreciated any sample code how to connect oracle table with dojo.

Here is my Report.jsp

 
Mohamed Sanaulla
Bartender
Posts: 3179
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the required chartData needs to be populated from a call to the server.

So the flow would be like this:
1. A servlet which would read your request for data, connect to the DB, and return the data.
2. Call this servlet end point from your Dojo and populate the chartData with the response received from the servlet.

To return a response from Servlet have a look at JSON. You would basically need to return a JSON array of integers from your servlet.

Hope you are aware of writing a servlet?

So you got to learn the following to achieve your requirement:
1. Writing a Servlet which reads the request parameters for any data your are passing and interact with the DB.
2. Read about JSON and how you can return JSON response from Servlet. For creating JSON content you can have a look at GSON or Jackson Object Mapper.
3. Call this API from your Dojo code.
 
pushpa naga
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your reply Mohamed Sanaulla.

I'm very much new to Java.This very urgent issue
Much appreciated if you can send me any sample code.
 
Mohamed Sanaulla
Bartender
Posts: 3179
34
Google App Engine Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pushpa naga wrote:Thanks a lot for your reply Mohamed Sanaulla.

I'm very much new to Java.This very urgent issue
Much appreciated if you can send me any sample code.

I am afraid I cannot send you the code. Its useful for you to learn and implement it yourself so that you can reuse your knowledge elsewhere. I know its easy to copy and paste when you are tight on deadlines, but its not the right way.
 
pushpa naga
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohamed Sanaulla,

Can't make it any progress in this issues.

So sorry to giving you an trouble again,please help in in this.

Your help is so much appreciated.

 
Mohamed Sanaulla
Bartender
Posts: 3179
34
Google App Engine Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pushpa naga wrote:Hi Mohamed Sanaulla,

Can't make it any progress in this issues.

So sorry to giving you an trouble again,please help in in this.

Your help is so much appreciated.



You can post your code here and let us know where you are stuck. Coderanch is NotACodeMill
 
pushpa naga
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohamed Sanaulla,

I can read my database tables data from my servlet & populating in my browser.(Is it right way to read table data)

After that how to parse that table data as an JSON object.

Not able to proceed forward, Please assist me this .

Here is my databaseAccess.java

 
pushpa naga
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mohamed Sanaulla,

Can we follow below steps to dynamically generate column charts using DOJO.

1. Exporting database table data to CSV file(Basically i have to get data dynamically from my database tables) from my servlet class & saved that csv file in an specified location(in my project location).

2. From that Csv file using CSVstore or CSVobjectStore i.e dojo modules can we populate column bar charts.

can we do like this.I don't know is it right way or not.

Thanks very much in advance.
Pushpa
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!