问题描述
功能图表(){
//创建要编辑的图表。
var wrap = new google.visualization.ChartWrapper();
wrap.setChartType('LineChart');
var conn = new ActiveXObject('ADODB.Connection'); //错误:未定义ActiveXObject
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)来自Customer_Productivity pdtdet' );
wrap.setOptions({'title':'Target-Wise(percentage)','legend':'none'});
wrap.draw( );
}
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();
}
推荐答案
这篇关于如何引用ActiveXObject?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!