Export sp data to excel problem

M

Martin D

I have a procedure which runs the following command in MS Access 2007;

sp = "EXEC rsp_PropertyClass @CONTRACT='MA2',@PROPERTYCLASS=' All' "
DoCmd.OutputTo acOutputStoredProcedure, sp, acFormatXLS, , True

It fails to run and gives me a incorrect syntax error, but if I run EXEC
rsp_PropertyClass @CONTRACT='MA2',@PROPERTYCLASS=' All' on the sql server it
runs fine.

Why would this happen?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top