dbTalk Databases Forums  

CommandTimeout and Drillthrough.htc

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss CommandTimeout and Drillthrough.htc in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Reinfried
 
Posts: n/a

Default CommandTimeout and Drillthrough.htc - 12-07-2004 , 09:59 AM






Is there a solution to set the CommandTimeout higher (e.g. CommandTimeout =
60) in the Drillthrough.htc-File from Microsoft?
So the default CommandTimeout in AnalysisServices = 30 and unfortunately the
timeout option cannot be set using Analysis Manager.

Many Thanks

Reply With Quote
  #2  
Old   
Reinfried
 
Posts: n/a

Default RE: CommandTimeout and Drillthrough.htc - 12-09-2004 , 09:11 AM






This is my solution and now I have no Timeout:

function DrillthroughSet()
{
this.MDX = ""
this.Tuple = null;
this.Recordset = null;
this.GetRecordset = getRecordset;

// this is the code that actually does the calling out to PivotTable
services to get the drillthrough data.
function getRecordset()
{
var sMDX;
var iMax;
var iNumRecords;
var fUsingOverallLimit = true;
var winTemp;
var cmd; //new for
CommandTimeout

if (this.Recordset != null)
return this.Recordset;

cmd = new ActiveXObject("ADODB.Command"); //new for
CommandTimeout
rs = new ActiveXObject("ADODB.Recordset");
cmd.ActiveConnection = element.Connection; //new
for CommandTimeout
cmd.CommandTimeout = 240; //new
for CommandTimeout

sMDX = this.MDX;

// do some limits checking and make sure we set MAXROWS in the
drillthrough call to return only the max number of
// rows.
if (dt.MaxDrillthroughRecords < 1) // if the user has set
maxdrillthorugh to 0, assume they don't want a limit.
iMax = -1;
else
iMax = (dt.MaxDrillthroughRecords - dt.CurrentRowCount);

if (iMax < 0 || (dt.MaxDrillthroughRecordsPerSet >= 0 &&
dt.MaxDrillthroughRecordsPerSet < iMax))
{
iMax = dt.MaxDrillthroughRecordsPerSet;
fUsingOverallLimit = false;
}

if (iMax > 0)
{
sMDX = sMDX.replace("DRILLTHROUGH", "DRILLTHROUGH MAXROWS " +
String(iMax));
}
else if (iMax == 0)
{
this.Recordset = null;
return null;
}


cmd.CommandText = sMDX; //new for
CommandTimeout
rs = cmd.Execute(); //new for
CommandTimeout


try
{
//rs.Open(); //new for CommandTimeout
}
catch (e)
{
// uhoh, something went wrong when talking to PivotTable services. As
the alert says, it might be some sort
// of security error (e.g., by default, only OLAP administrators have
permission to do drillthrough). Or perhaps
// drillthrough is not enabled/setup right in the cube.

// figure out which window to show this alert from.
if (winChild != null && dt.UserInterface.GetViewMode() ==
constants.plDrillthroughViewModeSpawn)
winTemp = winChild
else
winTemp = window;

winTemp.alert(L_Err8_ErrorMessage);
return null;
}

iNumRecords = rs.RecordCount;

dt.CurrentRowCount = dt.CurrentRowCount + iNumRecords;

if (iNumRecords == iMax)
{
// set a flag so that we show a warning later on when we are done
collecting our recordset.
if (fUsingOverallLimit)
dt.ShowTotalMaxWarning = true;
else
dt.ShowIndividualMaxWarning = true;
}

this.Recordset = rs;

return rs;
}
}


"Reinfried" wrote:

Quote:
Is there a solution to set the CommandTimeout higher (e.g. CommandTimeout =
60) in the Drillthrough.htc-File from Microsoft?
So the default CommandTimeout in AnalysisServices = 30 and unfortunately the
timeout option cannot be set using Analysis Manager.

Many Thanks

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.