CPGDeveloper
Board Regular
- Joined
- Oct 8, 2008
- Messages
- 190
Hi All~
I'm in the process of moving our Access based application to an Azure SQL Back End. Our application includes a reporting section that has a list of reports that a user can run. When a user selects a report, there is a query associated with that report -- I have VBA code that puts that query in a recordset, exports it to excel and does some minor formatting. With the Access Split Back End, everything was working fine -- but with a SQL Back End, I find I seem to get hung up on this particular bit of code:
oSheet.Range("A2").CopyFromRecordset rs
The code simply hangs as it tries to execute this. rs is the recordset I've previously defined. The particular query that this report is based on runs instantly, and there is no issue setting a recordset to this query. The results of this query are sizable, but again, it runs instantly -- and when I used an MS Access Back End I had no issues.
The only change I've made is to open the recordset as dbOpenDynaset and dbSeeChanges as the type and options -- this needs to be done if using a SQL Back End -- something I learned from this board.
Is there something I'm missing? Perhaps I need to re-conceive how I do this?
I'm in the process of moving our Access based application to an Azure SQL Back End. Our application includes a reporting section that has a list of reports that a user can run. When a user selects a report, there is a query associated with that report -- I have VBA code that puts that query in a recordset, exports it to excel and does some minor formatting. With the Access Split Back End, everything was working fine -- but with a SQL Back End, I find I seem to get hung up on this particular bit of code:
oSheet.Range("A2").CopyFromRecordset rs
The code simply hangs as it tries to execute this. rs is the recordset I've previously defined. The particular query that this report is based on runs instantly, and there is no issue setting a recordset to this query. The results of this query are sizable, but again, it runs instantly -- and when I used an MS Access Back End I had no issues.
The only change I've made is to open the recordset as dbOpenDynaset and dbSeeChanges as the type and options -- this needs to be done if using a SQL Back End -- something I learned from this board.
Is there something I'm missing? Perhaps I need to re-conceive how I do this?