Trying to connect my tchart to an MS Access Database programticaly I get an error message box claming "Unrecognized Database format + [path of the DB file].
I use TeeChartProActiveX5.
and the code is as follows:
Code: Select all
m_AdocPRO.SetConnectionString("DSN=MS Access Database;DBQ=C:\\orchid\\Bin\\Data\\Sessions\\AlgTestSessions\\000002_030819_00022.mdb;DefaultDir=C:\\orchid\\Bin\\Data\\Sessions\\AlgTestSessions;DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;UID=admin;");
m_AdocPRO.SetCommandType(1);
m_AdocPRO.SetRecordSource("SELECT * FROM CLMPRO");
m_AdocPRO.Refresh();
m_CLM_ArcvChart.Series(0).SetDatasourceType(dstSingleRecord);
m_CLM_ArcvChart.Series(0).SetDataSource((_variant_t)m_AdocPRO.GetRecordset());
m_CLM_ArcvChart.Series(0).GetYValues().SetValueSource("CDSTFIX");
m_CLM_ArcvChart.Series(0).GetXValues().SetValueSource("[TimeStamp]");
Thanks!