tamha Report post Posted September 25, 2008 Hi , I am new for FusionCharts and trying to learn from the Samples (specifically FusionCharts_CS.zip). Managed to compile the sample in VS2008 ASP.net c# but when running, getting connection string errors. ( The ConnectionString property has not been initialized. Description: An unhandled exception occurred during the execution of the current web request. Please review ) Updated the web.config with < connectionStrings>< add name="FusionChartsDB" providerName="System.Data.SqlClient" connectionString="server=MyServer;database=FusionChartsDB;Integrated Security=SSPI" /></ connectionStrings>I notice that the sample looks like it's using ODBC. How can I make this sample application connect to my sql server 2005. Any help will be greatly appreciated. Share this post Link to post Share on other sites
Arindam Report post Posted September 25, 2008 Hi, You can use similer connection string. for sqlserver <add name="SQLServer2005Connection" providerName="System.Data.Odbc" connectionString="uid=sa;pwd=pass;server=[server name];database=FactoryDB"/> <add name="TestsqlServer" providerName="System.Data.SqlClient" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True"/> Share this post Link to post Share on other sites
tamha Report post Posted September 25, 2008 Hi There, Sorry but still no luck. I have updated the Web.Config file with the following on your advice. ..... ..... <appSettings/> <connectionStrings> <add name="ConnectionStringFusionChart" providerName="System.Data.Odbc" connectionString="uid=sa;pwd=xxx;server=TESTSQL;database=FusionChartsDB"/> </connectionStrings> I am using the name="ConnectionStringFusionChart" because on google, search on DbHelper.Connection(DbHelper.ConnectionStringFisionChart) returns this in the InfoSoftGlobal.dll. Is my environment missing something? I am running IIS5.1 vs2008, Xp pro SP2. Standard stuff. The following is what the Event Log --> Application Loegged: Event code: 3005 Event message: An unhandled exception has occurred. Event time: 26/09/2008 10:17:55 AM Event time (UTC): 26/09/2008 12:17:55 AM Event ID: cd220170fa5c441db15b388e87339b81 Event sequence: 4 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/w3svc/1/ROOT/FusionCharts-2-128668618728111108 Trust level: Full Application Virtual Path: /FusionCharts Application Path: c:inetpubwwwrootFusionCharts Machine name: MYPC Process information: Process ID: 3048 Process name: aspnet_wp.exe Account name: MYPCASPNET Exception information: Exception type: InvalidOperationException Exception message: The ConnectionString property has not been initialized. Request information: Request URL: http://localhost/FusionCharts/Default.aspx Request path: /FusionCharts/Default.aspx User host address: 127.0.0.1 User: Is authenticated: False Authentication Type: Thread account name: MYPCASPNET Thread information: Thread ID: 1 Thread account name: MYPCASPNET Is impersonating: False Stack trace: at System.Data.Odbc.OdbcConnection.PermissionDemand() at System.Data.Odbc.OdbcConnectionFactory.PermissionDemand(DbConnection outerConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.Odbc.OdbcConnection.Open() at InfoSoftGlobal.DbHelper.Connection(String connectionString) at InfoSoftGlobal.BluePrintApp.FC_ASP.UserControls.header.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) Custom event details: For more information, see Help and Support Center at Thanks in advance for any help. Share this post Link to post Share on other sites
tamha Report post Posted September 25, 2008 Hi This is now fixed for those interested: In the sample web.config, you need to add the following : < appSettings> <add key="ConnectionStringFusionChart" value="DRIVER={SQL Server};SERVER=YOUR_SERVER_NAME;UID=sa;PWD=sapassword;DATABASE=FusionChartsDB"></add></ appSettings>I am testing using SQL Server 2005 and created the FusionChartsDB with their enclosed scripts. Share this post Link to post Share on other sites