Click here to Skip to main content
14,266,139 members
Rate this:
Please Sign up or sign in to vote.
function chart() {
// Create the chart to edit.
var wrap = new google.visualization.ChartWrapper();
wrap.setChartType('LineChart');
var conn = new ActiveXObject('ADODB.Connection');//Error :ActiveXObject is not defined
var connectionstring = 'Data Source=Server;Initial Catalog=dbname;User ID=sa;Password=sa;Provider=SQLOLEDB';

conn.Open(connectionstring);
// var rs = new ActiveXObject('ADODB.Recordset');

wrap.setDataSourceUrl('conn.Open(connectionstring)');
wrap.setContainerId('vis_div');
wrap.setQuery('Select MAX(pdtdet.Profit),MAX(pdtdet.Total_TargetAchieved) from Customer_Productivity pdtdet');
wrap.setOptions({'title':'Target-Wise (percentage)', 'legend':'none'});
wrap.draw();

}
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

ActiveX is supported only in IE. Have a look at this

uncaught Reference error: activexobject is not defined[^]
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

   
v2

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100