R
r7dis8qh
I'm trying to use OWC11 generate a chart from an ado recordset and
receive error '80004005' (with no other details) on the following line
of code:
oChartSpace.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimCategories, 0, "Agent"
in the following context:
Set oChart = Server.CreateObject("OWC11.Chartspace")
Set oChartConstants = oChart.Constants
Set oChart.DataSource = oRecordSet
oChart.Charts.Add
oChart.Charts(0).Type = oChart.Constants.chChartTypeColumnClustered
oChart.Charts(0).SeriesCollection.Add
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimCategories, 0, "Agent"
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimValues, 0, "Total"
oChart.ExportPicture szFileName, "gif", 800, 400
If i loop through the recordset and convert it to a couple of arrays
and use:
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimCategories, oChartConstants.chDataLiteral,
arrAgent
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimValues, oChartConstants.chDataLiteral, arrTotal
it works!
I believe i create the recordset correctly (i know its fussy about the
cursor):
szConStr = "Provider=OraOLEDB.Oracle;" &_
"Data Source=(XXXXXX);User Id=XXX;Password=XXX;PLSQLRSet=1;"
Set oDB = server.CreateObject("ADODB.Connection")
oDB.ConnectionString = szConStr
oDB.Open
Set oCmd = Server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = oDB
oCmd.CommandType = adCmdStoredProc
oCmd.CommandText = "pkg.procedure"
oCmd.Parameters.Append oCmd.CreateParameter("P1", adVarChar,
adParamInput, szParameter,szParameter
Set oRS = CreateObject("ADODB.RecordSet")
oRS.CursorType = adOpenStatic
oRS.CursorLocation = adUseClient
Set oRS = oCmd.Execute
Any thoughts??? where have i gone wrong? i cant even find any usefull
documentation or sample code!
receive error '80004005' (with no other details) on the following line
of code:
oChartSpace.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimCategories, 0, "Agent"
in the following context:
Set oChart = Server.CreateObject("OWC11.Chartspace")
Set oChartConstants = oChart.Constants
Set oChart.DataSource = oRecordSet
oChart.Charts.Add
oChart.Charts(0).Type = oChart.Constants.chChartTypeColumnClustered
oChart.Charts(0).SeriesCollection.Add
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimCategories, 0, "Agent"
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimValues, 0, "Total"
oChart.ExportPicture szFileName, "gif", 800, 400
If i loop through the recordset and convert it to a couple of arrays
and use:
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimCategories, oChartConstants.chDataLiteral,
arrAgent
oChart.Charts(0).SeriesCollection(0).SetData
oChartConstants.chDimValues, oChartConstants.chDataLiteral, arrTotal
it works!
I believe i create the recordset correctly (i know its fussy about the
cursor):
szConStr = "Provider=OraOLEDB.Oracle;" &_
"Data Source=(XXXXXX);User Id=XXX;Password=XXX;PLSQLRSet=1;"
Set oDB = server.CreateObject("ADODB.Connection")
oDB.ConnectionString = szConStr
oDB.Open
Set oCmd = Server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = oDB
oCmd.CommandType = adCmdStoredProc
oCmd.CommandText = "pkg.procedure"
oCmd.Parameters.Append oCmd.CreateParameter("P1", adVarChar,
adParamInput, szParameter,szParameter
Set oRS = CreateObject("ADODB.RecordSet")
oRS.CursorType = adOpenStatic
oRS.CursorLocation = adUseClient
Set oRS = oCmd.Execute
Any thoughts??? where have i gone wrong? i cant even find any usefull
documentation or sample code!