Database query - nbr of rows returned different

C

cd

I am running a stored procedure.
When I use the database query option in import external data
and run the stored proc - I get the expected number of rows (18990).

But when I run the stored proc in my macro. Below is the code
I am using
' Assign the Connection object.
.ActiveConnection = cnRap
' Extract the required records.

.Open sqlStmt
' Copy the records into on Sheet.
SheetName.Range(CellNum).CopyFromRecordset rsRap

It only returns 900 rows.

Any ideas?
 
Top