Recently I was using the CopyFromRecordset method (as I have done for years) and I ran into something wierd.

I was programming Excel through Access VBA (late binding). I was using ADODB.Connection, ADODB.Command and an ADODB.Recorset objects. The command object was referencing an SP on the database server and the recordset object was referencing the command.

I have done this a thousand times, however this time when I tried to use the CopyFromRecordset method it would only copy over the first 21 columns.

I know that there are 2 additional parameters (max rows, max columns) to the method other than the recordset itself but providing values for them made no difference.

When I tried looping through the RS any column after the first 21 reported back invalid use of null if referenced, even though when holding my mouse over the field I could see the correct value that it held.

I created a different workaround (albeit a bit more convoluted) so there's not much pressure for a response but I was wondering if anyone else had experienced this and came up with a solution or atleast the reason behind it.

Thanks, db