Re: What to use for ADO parameter type and size



RB Smissaert wrote:
Set rs = .Execute( ,Array(arr2(i, 0)))

This does work, but is slightly slower than doing:

Set rs = .Execute( ,arr2(i, 0))

What is the reason for doing Array(arr2(i, 0)) ?



A single-dimensioned variant array containing the parameter value(s) is
required here. The 2-dimensional array you have here should be causing a
type mismatch ... unless the element referenced by arr2(i,0) contains a
variant array. In my experience, a type mismatch is caused by this:

Set rs = .Execute( ,5)

To make it work, I've had to do this:

Set rs = .Execute( ,Array(5))

I cannot believe you are seeing a measurable performance difference here. It
really makes me question exactly what you are measuring and how you are
measuring it. In absolute numbers, exactly what timings are you seeing?

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


.



Relevant Pages

  • Re: What to use for ADO parameter type and size
    ... Optional lReturnedRows As Long, _ ... Optional strError As String, _ ... As far as I can see arr2does not refer to a variant array but to a single value. ... It really makes me question exactly what you are measuring and how you are measuring it. ...
    (microsoft.public.data.ado)
  • Re: pass field or table names as parameter?
    ... RB Smissaert wrote: ... to a query? ... and then supply the field and table as a variant array? ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)