Data Connection
Are you using the WebChart component ?
If so, you should know that WebChart doesn’t yet work with databases at design time – however, it runs fine with databases designed at runtime. Please see “Tutorial8 – ADO.NET Database Access” for some runtime examples.
Josep Lluis Jorge
http://support.steema.com
If so, you should know that WebChart doesn’t yet work with databases at design time – however, it runs fine with databases designed at runtime. Please see “Tutorial8 – ADO.NET Database Access” for some runtime examples.
Josep Lluis Jorge
http://support.steema.com
-
- Newbie
- Posts: 7
- Joined: Fri Jan 16, 2004 5:00 am
- Location: UK
I have now purchased TeeChart and have download and installed the latest version. I have following the Tutoital8, but still I am unable to get anything to work. I am using the WebChart component, and when I compile I am getting the following:-
c:\inetpub\wwwroot\picker-results\graphtest.aspx.cs(23): The type or namespace name 'Bar' could not be found (are you missing a using directive or an assembly reference?), c:\inetpub\wwwroot\picker-results\graphtest.aspx.cs(28): The type or namespace name 'bar1' could not be found (are you missing a using directive or an assembly reference?), c:\inetpub\wwwroot\picker-results\graphtest.aspx.cs(34): The type or namespace name 'MessageBox' could not be found (are you missing a using directive or an assembly reference?)
Copy of code below:-Code: Select all
using System.Data; using System.Data.OleDb; using System.Security; using System.Security.Permissions; namespace picker_results { /// <summary> /// Summary description for graphtest. /// </summary> public class graphtest : System.Web.UI.Page { protected Steema.TeeChart.Web.WebChart WebChart1; private void InitializeComponent() { } private void Page_Load(object sender, System.EventArgs e) { DataSet masterDataSet = new DataSet(); Bar bar1 = new Bar(tChart1.Chart); try { OpenConnWithJet40(ref masterDataSet); DataTable employeeTable = masterDataSet.Tables["Employee"]; bar1.YValues.DataMember = employeeTable.Columns["SALARY"].ToString(); bar1.LabelMember = employeeTable.Columns["LASTNAME"].ToString(); bar1.DataSource = employeeTable; } catch (SecurityException) { MessageBox.Show("The calling method has not been granted sufficient permission to access the Microsoft Jet 4.0 OLE DB Provider."); } } [OleDbPermissionAttribute(SecurityAction.Demand, Provider="Microsoft.Jet.OLEDB.4.0")] private void OpenConnWithJet40(ref DataSet MasterDataSet) { OleDbConnection testConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data Source=C:\Program Files\Steema Software\TeeChart for .NET v1\Sample data\TeeChart.mdb;"); testConn.Open(); string strCom = "SELECT * FROM Employee" ; OleDbDataAdapter myCommand = new OleDbDataAdapter(strCom,testConn); myCommand.Fill(MasterDataSet,"Employee") ; testConn.Close(); } } }
Hello,
You could add a using to the file.
eg.
or add the namespace to the declaration:
eg.
(I put WebChart1 instead of TChart1, It seems that might be what you require there)
Something similar will be needed for MessageBox
eg.
Regards,
Marc Meumann
Steema Support
You could add a using to the file.
eg.
Code: Select all
using Steema.TeeChart.Styles
eg.
Code: Select all
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(WebChart1.Chart);
Something similar will be needed for MessageBox
eg.
Code: Select all
using System.Windows.Forms
Marc Meumann
Steema Support
-
- Newbie
- Posts: 7
- Joined: Fri Jan 16, 2004 5:00 am
- Location: UK
Hello,
I think the simplest approach may be to compare your project to the WebForm project supplied with TeeChart.
If you are using temp files (WebChart TempChart property) to move the Chart to the page then please check that the folder has the correct write rights. If you are using 'Session' then check that you have the GetChart.aspx file as part of your project to read and return the session saved Charts.
Regards,
Marc Meumann
Steema Support
I think the simplest approach may be to compare your project to the WebForm project supplied with TeeChart.
If you are using temp files (WebChart TempChart property) to move the Chart to the page then please check that the folder has the correct write rights. If you are using 'Session' then check that you have the GetChart.aspx file as part of your project to read and return the session saved Charts.
Regards,
Marc Meumann
Steema Support
-
- Newbie
- Posts: 7
- Joined: Fri Jan 16, 2004 5:00 am
- Location: UK
Hi,
It still not supporting in the lastest release available. Will be in cluded in one of the next releases but I cannot tell for sure in which one.Is the WebChart still not supporting datasets at design time? If not, when is the planned release of this function?
Pep Jorge
http://support.steema.com
http://support.steema.com