I have a stored procedure that runs on an SQL server (running SQL Server 2008 R2 SP2), updating an SQL table.
I also have an Excel 2007 spreadsheet with a macro that opens a recordset to the SQL stored proc, initiating the update of the SQL table.
Through initial development, there were no problems using the macro to kick off the stored proc. However, the next step of the development process requires taking a data snapshot before and after the update. When we add the creation of a log table for this purpose, the Excel macro stops working, issuing an 8004E021 error. We've tried both in-memory and disc-based tables, both returning the same error. Remove the logging code (particularly the creation of the table), and the script runs successfully. We've also tried separate scripts that only create a table -- no other processing -- and they fail as well.
Is there some setting in SQL (or Excel, perhaps, or VBA) that will allow a VBA macro to execute a SQL stored proc that creates a table during execution?
Thanks in advance for any advice!
I also have an Excel 2007 spreadsheet with a macro that opens a recordset to the SQL stored proc, initiating the update of the SQL table.
Through initial development, there were no problems using the macro to kick off the stored proc. However, the next step of the development process requires taking a data snapshot before and after the update. When we add the creation of a log table for this purpose, the Excel macro stops working, issuing an 8004E021 error. We've tried both in-memory and disc-based tables, both returning the same error. Remove the logging code (particularly the creation of the table), and the script runs successfully. We've also tried separate scripts that only create a table -- no other processing -- and they fail as well.
Is there some setting in SQL (or Excel, perhaps, or VBA) that will allow a VBA macro to execute a SQL stored proc that creates a table during execution?
Thanks in advance for any advice!