Re: ADODB Recordset and Connection



Set rcdSet = New ADODB.Recordset

I don't think you need the line above. You already have...
"Dim rcdSet As New ADODB.Recordset"
in the first procedure.

It should be the other way round:

Dim rcdSet As ADODB.Recordset
Set rcdSet = New ADODB.Recordset

The former causes all kind of problems as it is fairly to set rcdSet back to
Nothing.
Try inspecting afterwards to see if it is still Nothing. The act oof
inspecting it re-instantiates it.

It also causes problems if you are trying to return multiple rowsets back in
1 RecordSet.
NextRecordSet does not work.

See "Explicitly Create Objects" in
http://msdn2.microsoft.com/en-us/library/ms810818.aspx
Old but still relevant

Stephen Howe


.