Click here to Skip to main content
15,887,892 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Retrieving the COM class factory for component with CLSID {0002E500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).


the above error occured while displaying the graph of daily updates!!!
Posted
Comments
joshrduncan2012 27-Jan-14 9:07am    
Show us your code please where this error is happening.
phani dhar 27-Jan-14 9:11am    
josh
using System.Xml;
using OWC;
using System.Runtime.InteropServices;
public partial class BSE : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["connection"]);
protected void Page_Load(object sender, EventArgs e)
{
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from BSE", con);
DataSet ds = new DataSet();
sda.Fill(ds);
con.Close();
for (int j = 0; j < ds.Tables[0].Rows.Count; j++)
{
Label1.Text = ds.Tables[0].Rows[j]["aban_offshore"].ToString();
Label2.Text = ds.Tables[0].Rows[j]["ABB"].ToString();
Label3.Text = ds.Tables[0].Rows[j]["ACC"].ToString();
Label4.Text = ds.Tables[0].Rows[j]["Adani_enter"].ToString();
Label5.Text = ds.Tables[0].Rows[j]["Aditya_Birla_Nuvo"].ToString();
Label6.Text = ds.Tables[0].Rows[j]["Allahabad_Bank"].ToString();
Label7.Text = ds.Tables[0].Rows[j]["Ambuja_Cement"].ToString();
Label8.Text = ds.Tables[0].Rows[j]["Andhra_Bank"].ToString();
Label9.Text = ds.Tables[0].Rows[j]["Appollo_Hospital"].ToString();
Label10.Text = ds.Tables[0].Rows[j]["Areva_T_and_D"].ToString();
}
//////////////////////////////////////////////////////////

con.Open();
DataSet ds1 = new DataSet();
SqlDataAdapter da = new SqlDataAdapter("select dates, closes from BSEagg", con);
da.Fill(ds1);

ChartSpaceClass oChartSpace = new ChartSpaceClass();




System.IO.StringWriter sw = new System.IO.StringWriter();
XmlDocument xDoc = new XmlDocument();
ds1.WriteXml(sw);
// clean up
con.Close();
da.Dispose();
ds1.Dispose();
xDoc.LoadXml(sw.ToString());
sw.Close();
System.Xml.XmlNodeList nodes;
nodes = xDoc.ChildNodes.Item(0).ChildNodes;
int nCount = nodes.Count;
string[] aNames = new string[nCount];
string[] aTotals = new string[nCount];
string names = String.Empty;
string totals = String.Empty;
int i = 0;
for (i = 0; i < nCount; i++)
{
aNames[i] = nodes.Item(i).ChildNodes.Item(0).InnerText;
aTotals[i] = nodes.Item(i).ChildNodes.Item(1).InnerText;
}
try
{
names = String.Join("\t", aNames);
totals = String.Join("\t", aTotals);
oChartSpace.Charts.Add(0);
oChartSpace.Charts[0].SeriesCollection.Add(0);
oChartSpace.Charts[0].SeriesCollection[0].SetData(OWC.ChartDimensionsEnum.chDimCategories,
Convert.ToInt32(OWC.ChartSpecialDataSourcesEnum.chDataLiteral), names);
oChartSpace.Charts[0].SeriesCollection[0].SetData(OWC.ChartDimensionsEnum.chDimValues,
Convert.ToInt32(OWC.ChartSpecialDataSourcesEnum.chDataLiteral), totals);
string strFullPathAndName = Server.MapPath("~/graph/" + System.DateTime.Now.Ticks.ToString() + ".gif");
oChartSpace.ExportPicture(strFullPathAndName, "gif", 800, 600);
string[] arr = new string[] { };
arr = strFullPathAndName.Split('\\');
Panel1.Visible = true;
Image3.Visible = true;
Image3.ImageUrl = "~/" + arr[arr.Length - 2] + "/" + arr[arr.Length - 1];
}
catch (Exception ex)
{

throw;
}

}
}
phani dhar 27-Jan-14 9:31am    
can any body view this code

 
Share this answer
 
Comments
phani dhar 27-Jan-14 9:17am    
ya .. ur right , but how to register that ..can u fix it!!
phani dhar 27-Jan-14 9:36am    
how to register a class ,please suggest
Kornfeld Eliyahu Peter 27-Jan-14 12:54pm    
According you CLSID, the missin dll is ole32.dll - so open an elevated command prompt an run 'regsvr32 ole32.dll' (without quotes)...
It looks the Office 2000 ChartSpace Object[^] is not registered on the computer your are using.
 
Share this answer
 
Comments
phani dhar 27-Jan-14 9:15am    
hello pallini , aboce i posted the full code...if ur unable to follow it...i am on team viewer u can view my screen and error

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900