• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Read a database to display graph in .NET

Does anyone know of a guide that shows how to do this?

I'm trying to read a database into a array, two parts.

Day and Cost

I want to read this and plot it on a bar graph.

I would like to make it dynamic so I can choose my Days and then create the graph.

http://www.prestigedevgroup.co...TutorialAjaxPage2.aspx

I'm working with this code..

Specifically, the area I'm having a problem with is.


****

Chart.LabelsX.Add("Monday")
...

Chart.LabelsX.Add("Friday")

and

H.Add("Monday", 10)

...


H.Add("Sunday", 35)

****

This part above needs to be read from a database, what would be the best technique to read tables that have these two columns?

Thanks
 
You didn't specify which database you're connecting too. Do you already have a dataset object populated with the data you want to display?
 
Which version of .NET? If you are using 2.0 you can use DataSets, but if you are using 3.5 you should look into LINQ.
 
Sorry, well in the long run it's gonna be a Oracle database but for now I'm going to use what Visual Studio 2005 has which is SqlExpress. I'm using 2.0.

I don't think LINQ can work with Oracle 10g right?

Edit: Is the proper term for this an ArrayList that is being used in the linked example from above?
 
LINQ is an ORM. It works with Oracle - no issues (at least none that I have come across yet). If you're using .NET 2.0, stick to DataSets.

I should warn you, though, that none of my code has been deployed to production yet. So, I don't know how well it performs. Also, I haven't used the LINQ Designer for mapping to Oracle objects, because VS2008 simply won't allow it from within Server Explorer. I have been using LINQ to DataSet for all my Oracle work.

I am playing around with the DBLinq provider for Oracle, Postgres, and MySQL found here: http://code2code.net/DB_Linq/. I haven't found any issues with it, but I am not sure what the library does under the covers [just need to spend some time with the library's source code].
 
Thanks, I read somewhere that only MS SQL has LINQ capabilities so I ignored it. I still don't know much about it, only from the video I saw. The guy made a totally customizable table with no coding. I guess I should read into it more.

The situation we're in is my supervisor ordered Visual Studio 2008 so we can use 3.5 if we want to. I just know more about 2005 but I'm no Pro.
 
Back
Top