--- In [email protected], "Sheri" <sheri...@...> wrote: > I don't know if I'm supposed to have an updated Vec plugin.
No, not needed, but the com plugin I put up had gremlins. > I haven't tried to see what the GetRows returned array looks like in VBA but > the documentation says: "Use the GetRows method to copy records from a > Recordset into a two-dimensional array. The first subscript identifies the > field and the second identifies the record number. The array variable is > automatically dimensioned to the correct size when the GetRows method returns > the data." > > That sounds backwards to what I'm used to with regex 2d vectors (where the > first index is the row number and the second is a column number). > > In fact the Powerpro help states that 2d vectors are organized by rows. Yeah. In fact to make 2d work for this particular case I've swapped dimensions in comPlugin0.73_100401_2noRefCounting.zip which includes a script using getRows. But not sure whether it might be better to always just copy into a 1D vec, cause there's no reason to assume ever SAFEARRAY with 2 dimensions will organise stiff in the same way (BTW I'm not fussing with subscripts when extracting data from SAFEARRAY; I jsut grab the whole block of data with SafeArrayAccessData and convert each item in the block I get back into a string. Oops, I think I should have called SafeArrayDestroy, so there's probably a leak, and maybe problem disconnectiong from database, though no apparent problem in my short sample script. > Anyway, accessing the vector as a 1d vector it was easy enough to substitute > records from your hVec into my process (which still creates and returns a > vector that uses class-style records). Haven't timed it, but feels zippier. Good There's also comPlugin0.73_100401_2RefCounting.zip in the usual place, exactly same as above but ref counting. So far no problems, let me know if you get any.
