VBA Scripting + Automation Exception

've simplified this script by about ‡ and I’m still getting the same problems. When I try to refresh this document in webi it comes up with the following error :

Automation exception BusinessObjects server process raised an Automation exception (BOMGR0060) IDispatch error #109 A variable prevented the data provider SQL 1 with <oracle 8.15 database> from being refreshed. (DMA0008):

However, if I click on Refresh again it will work PERFECTLY FINE!!!

Here is the script that is embedded :

Sub main()

Dim firstvar, secondvar As String

firstvar = Format(firstvar, “mm/dd/yyyy hh:mm:ss”) secondvar = Format(secondvar, “mm/dd/yyyy hh:mm:ss”)

Application.Variables.Item(“1) Please enter a Start Date Added”).Value = “2/1/2000 00:00:00” Application.Variables.Item(“2) Please enter an End Date Added”).Value = “2/29/2000 23:59:59”

ActiveDocument.Refresh

Application.Variables.Item(“1) Please enter a Start Date Added”).Delete Application.Variables.Item(“2) Please enter an End Date Added”).Delete End Sub

If I run it locally with full client I never receive any error. BO 5.0.2 Webi 2.5.2 NT boxes all around. They submitted this error to be fixed in the next SP but I don’t have that luxury of waiting and was wondering if anyone had any good ideas.

Ian


Listserv Archives (BOB member since 2002-06-25)

Maybe you should try to use document variables instead of application variables.

ActiveDocument.variables.item(…).value = your value

You don’t have to delete the document variables as you do in your script with application variables.

Not sure it will work… just an idea

Christophe


Listserv Archives (BOB member since 2002-06-25)

WHOO HOO!! hehe

Thanks Christophe…worked like a charm…maybe I should call BO back and tell them the resolution :slight_smile:

Ian

Christophe.Pilosio@UCB-GROUP.COM 04/05/00 01:25AM >>>
Maybe you should try to use document variables instead of application variables.

ActiveDocument.variables.item(…).value = your value

If I run it locally with full client I never receive any error. BO 5.0.2 Webi 2.5.2 NT boxes all around. They submitted this error to be fixed in the next SP but I don’t have that luxury of waiting and was wondering if anyone had any good ideas.


Listserv Archives (BOB member since 2002-06-25)