[AccessD] ADO Collect Collection

Jim DeMarco Jdemarco at hshhp.org
Thu Dec 4 14:45:34 CST 2003


One of our developer's stumbled across this while doing some research.  Has anyone heard of it or used it?

<ADOCollection>
The ADO Recorset object exposes a hidden, undocumented member: the Collect property. This property is functionally similar to the Field's Value property, but it's faster because it doesn't need a reference (explicit or implicit) to the Field object. You can use this property by passing a numeric index or a field's name, as in:
Dim rs As New ADODecordset rs.Open "authors", "DSN=pubs"

'reference by field's name 
firstName = rs.Collect("au_fname")

' reference by field's index 
rs.Collect(2) = "John Doe"
Under ADO 2.5, the Collect property appears to be about 30% faster than the standard way to refer to a field's value
</ADOCollection>

Jim DeMarco
Director Product Development
Hudson Health Plan



***********************************************************************************
"This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged.  If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited.  If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message.  Thank You".
***********************************************************************************



More information about the AccessD mailing list