Page 1 of 1

dbr or dbs or dbsw stop working

Posted: Thu Mar 10, 2011 6:26 am
by MSidat
Hi all.

I have an issue where my dbr's stop working in excel 2003. We are basically using vba to run a series of TI's after taking parameters from the user and also reading and writing back to a series of datapoints in tm1, not more than 100.

Now the Tis continue to run which means the connection is still open but the dbr or dbsw or dbs do not work until I restart Excel and in the meanwhile they come up with either key error or error 2042. I log in as admin so security should not be an issue. Like I said on restart of Excel it works fine.

Any ideas what it could be.

cheers.

Re: dbr or dbs or dbsw stop working

Posted: Fri Mar 11, 2011 5:52 pm
by suhamore
I hope you are calling TM1RECAlC function in vba after the TI execution

Re: dbr or dbs or dbsw stop working

Posted: Fri Mar 11, 2011 7:08 pm
by ellissj3
I have seen this error and sometimes adding Activeworkbook.calculate after the TM1Recalc has worked

Another solution is to go through each sheet and do the following
Application.run "Tm1recalc1"
Activesheet.calculate

Re: dbr or dbs or dbsw stop working

Posted: Fri Mar 11, 2011 10:22 pm
by MSidat
Usually yes we do call the TM1Recalc or Tm1recalc1 function. BUt the thing is the Dbr I am reffering it is actually within my VBA code and not on the workbook or in a sheet i.e. I am putting in a application.run("DBR", etc etc etc) function and it just does not work. I am still connected to TM1, Ti executes but the DBR just stop working via the application.run routine and the sheet itself. only an excel restart fixes the issue.

Re: dbr or dbs or dbsw stop working

Posted: Mon Mar 14, 2011 2:31 pm
by MSidat
Figured this out.

Had to put an:
Application.Run ("M_Clear") before my DBR.

As just prior to this the DImension was changed by another TI so the M_Clear needed to be called to reload and refresh the dimensions in memory. (Possibly??!!!)

Re: dbr or dbs or dbsw stop working

Posted: Mon Mar 14, 2011 4:41 pm
by paulsimon
Yes M_CLEAR seems likely. Excel caches up some of the TM1 data, and using the M_CLEAR macro can be used to force Excel to refresh its local cache of TM1 data. I have also used it in the past to get Dynamic MDX subsets to refresh.

Regards


Paul Simon