I need to write a stored procedure which reads data from SQL Server and writes it into a MS Access 2003 table. I tried the following but it is not working:
Insert into OpenRowSet
('Microsoft.Jet.OLEDB.4.0',
'D:\BEMF_LOAN_RECOVERY.mdb';
''; -- User ID
'', -- Password
'Select * from access_tbl_name')
Select *
from sql_server_tbl_name
Error mesage
Msg 7308, Level 16, State 1, Line 2
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.
D:drive in question will be the one on the SQL Server, not on your local PC, assuming that they're different?