CREATE TABLE #tmpTable ( COL1 int, COL2 int, COL3 nvarchar(max), COL4 nvarchar(max), COL5 bit ) INSERT INTO #tmpTable exec SpGetRecords ‘Params’ NOTE: The columns of #tmpTable must be the same as SpGetRecords. Otherwise, there will be a problem. If there are no parameters in the stored procedure, you don’t need to use ‘Params’.
Tag: temp table
How to solve “TableAdapter can’t see stored procedure returned fields when using temp table” problem
Add these lines to the beginning of your stored procedure. The statement is never executed, but for some reason it gets the job done. I really don’t know how and why 🙂 IF 1=0 BEGIN SET FMTONLY OFF END