Then I changed my code to like this:
why does the code don't work either?
Set Collection(i) = New ADODB.Recordset
Set CollectCnn(i) = New ADODB.Connection
CollectCnn(i) = PeopleCnn
CollectCnn(i).Open
Collection(i).Open Sql, Collection(i), 3, 3<error>
error message:the recordset using a connection that is closed or invalid.
why?
Thanks for any message.