Hi Folks,
Hoping someone has encountered this so that I don't have to start hacking
around in the source code.
I have an application that uses changes the
WorkBook.PivotCache.CommandText property in an Excel 2003 workbook. I do
it as advertised:
$pc->{CommandText} = $sql;
It works as advertised. When the CommandText property changes, the query
is executed and data is refreshed. The problem is that it works too well.
The aggresive bugger executed the query 3 times. Through various
debugging efforts, I have tracked it down to this statement. And the
error is consistent.
I don't believe that this is a MS problem. When I write the similar VB code:
Dim pc as PivotCache
...
pc.CommandText = sql
The query executes once and only once. Same results at 1/3 the effort.
I have tried variations on setting the property with "LetProperty" with no
difference. So long as I try and set the CommandText property from Perl
it executes the query 3 times. For all I know, the problem might be
ubiquitous and by design and that whenever the module set a property it
does so three times, but is only noticeable when the setting of the
property take a noticeable amount of time as in my case. In the end it
works, but it is kinda a drag if your query takes 5 minutes.
My questions are:
1) Am I doing something wrong?
1) Is this a known behaviour?
2) Is it avoidable?
3) Failing the above, where in the source code should I begin to debug?
I am using:
Windows XP, Perl 5.8.8 Build 5.17, and the most recent version of
libwin/Win32::OLE downloaded using ppm3 from ActiveState.
Thanks in Advance,
Chris
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs