dbTalk Databases Forums  

Manually Invoke Cube Processing

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


Discuss Manually Invoke Cube Processing in the microsoft.public.sqlserver.olap forum.



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

Default Manually Invoke Cube Processing - 07-21-2005 , 02:23 AM






Hi there,

I have recently upgraded my server to Windows Server 2003 SP1. SQL Server
2000 is at SP4 with Analysis Services installed. I am using the DSOCtrl.DLL
found at:

http://www.databasejournal.com/featu...nt.php/1462631

which once allowed me to process any cube on the server. Now, from my XP SP1
workstation, if I try and run that code (below) from a Delphi program I get
error:

"ActiveX Component Can't Create Object"

I have installed PTS, added appropriate users to OLAP Administrators, added
same to RepositoryUser role, etc. etc.

Can anyone shed any light on to why this error is occurring?

Thanks,
Kim.
__________________________________________________ ___________
unit Unit1;
interface

uses
Windows, Messages, SysUtils, ActiveX, Variants, Classes, Graphics,
Controls, Forms,
Dialogs, ComObj, DSOCTRL_TLB, UCrpeClasses, UCrpe32, StdCtrls;

type
TfmReports = class(TForm)
Button1: TButton;
Crpe1: TCrpe;
Label13: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
fmReports: TfmReports;

implementation

{$R *.dfm}

procedure TfmReports.Button1Click(Sender: TObject);
var
objDSOCtrl : Variant;
int : integer;
begin
if MessageDlg('This report will first refresh the OLAP "IR" cube - doing
this now!', mtInformation,
[mbOk, mbCancel], 0) = mrOK then
begin
Crpe1.Clear;
//
Crpe1.ReportName := 'E:\Share\sms\reports_sql\R11_OLAP.rpt';
//Crpe1.ReportName := 'R11_OLAP.rpt';
//******* VIP *********
Crpe1.DiscardSavedData;
//******* VIP *********
Crpe1.Formulas.Clear;
Crpe1.Selection.Formula.Clear;
objDSOCtrl := CreateOLEObject('DSOCtrl.OLAPProc');
objDSOCtrl.Server := 'OIC01';
objDSOCtrl.Database := 'Stats';
objDSOCtrl.Cube := 'IR';

//***** Error occurs at following line:
Label13.Caption := objDSOCtrl.LastProcessed;
//***** Error occurs at line above:

objDSOCtrl.ProcessType := processRefreshData;
fmReports.Cursor := crHourGlass;
int := objDSOCtrl.ProcessCube;
Label13.Caption := 'Finished refresh of "IR"... ReturnVal=' +
IntToStr(int)+ ' (0 = "OK")';
fmReports.Cursor := crDefault;
Label13.Caption := '';
Crpe1.Execute;
end;
end;

initialization
CoInitialize(nil); // <-- manually call CoInitialize()

finalization
CoUnInitialize; // <-- free memory

end.



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.