Hi,
I have problem retrieving data from MS SQL server to Excel.
Let me describe what I am trying to do and hopefully the experts out there could help.
First of all, I have some data stored in MS SQL Server. I am trying to create a user interface in Excel using VBA. The users would choose some criteria using VBA forms and I hope to pass these criteria to SQL Server and run a stored proc. The stored proc would process the data using this set of criteria and return the required data back to Excel spreadsheet.
My first question is, will this work if my stored proc creates a temp table and at the end of the stored proc the data being returned to Excel is from this temp table. I have this in mind because the stored proc is doing fine, but when I tried to link this to Excel using VBA, it says the connection is closed although when I go into debug mode (step into) the connection hasn't been closed.
I want to make sure it's not a problem using temp table in the stored proc, then I can concentrate in solving the "connection closed" problem, if not I will be trying to solve a problem concentrating at the wrong place.
thanks.
Daniel

RecordSet problem
Jassim Rahma
Hi
If you search this and other forums you will find that passing parameters to a stored procedure is probably not the way forward. I tend to work around the problem by having an Access database to link the MS SQL sever tables, and I use DOA / AODB to pass queries to Access.