Question

Locked

recordset results show in excel

By gener.santos ·
Hi,
How can I put the results of a stored procedure in a recordset so I can put it in a excel sheet? Below is the code I am using:

Dim conn As ADODB.connection
Set conn = New ADODB.connection
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
conn.Open "PROVIDER=SQLOLEDB;DATA SOURCE=XSOURCE;INITIAL CATALOG=XCATALOG;INTEGRATED SECURITY=sspi;"
conn.Execute "exec MyProcedure '10/01/2008','10/31/2008'"

I need the result of the above to be displayed in a sheet (sheet101).

Thanks

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums