Jump to content
Software FX Community

Importing data from Oracle Database


Garry

Recommended Posts

I am trying to chart data from an Oracle Database using the Oracle Connection String in Visual Studio 2003.

 However, when I attempt to chart the data from the filled dataset, it plots the dataset properties rather than the actual data in the table.

 Here is my code; it's less than professional but it should serve its purpose

 

Imports System.Data.OleDb
Imports SoftwareFX.ChartFX.Lite
Public Class Form1
  Inherits System.Windows.Forms.Form

 

  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  'Change the connection string to be sure that is pointing to the right please.
  'Users should change at design time too.
  Chart1.SerLegBox = True
  Me.oracleConnection1.ConnectionString = "User Id=xxx.xxxx;Data Source=xxxx-xxxx-ORACLE;Password=xxx;Persist Security Info=true;"
  Me.OracleDataAdapter2.Fill(Me.MvwVolume6Month51)

  End Sub

 

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  With Chart1
  'Notice that DataType needs to be set bebore filling the dataset or before binding
  .DataType(0) = DataType.Value
  .DataType(1) = DataType.Value


  .DataSource = Me.MvwVolume6Month51.MvwVolume6Month.ASSIGNED_GROUPColumn
  .DataSource = Me.MvwVolume6Month51.MvwVolume6Month.N_TICKETSColumn

  .Gallery = Gallery.Bar
  'It requires: Imports SoftwareFX.ChartFX.Lite

  With .AxisX
  .Gridlines = True

  End With


  End With

  End Sub

End Class

 
Posted Image
 

 

Thanks! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...