Solved

SSIS:  OLE DB Source object can't read columns of a EXEC SP that contains temp tables (Hash Table?)

Posted on 2008-06-23
5
827 Views
Last Modified: 2013-11-30
Hi All

SSIS - I am trying to insert the results of a ole db source/stored proc, into a ole db destination/table.
In the ole db source object, Connection Manager, I have SQL Command/ my SP typed out, and hitting the 'Preview' button shows the returned recordset as expected.

Problem:  In the ole db source object, Columns, no columns are visible.  

I have heard that this may be because I am using temp tables in my SP, that I have to replace them with 'hash tables', but I am not familar with these.

Question:  Does using temp tables cause problems in DTS/SSIS?  

Thanks in advance.
Jim
0
Comment
Question by:Jim Horn
  • 3
5 Comments
 
LVL 4

Accepted Solution

by:
zx10r earned 500 total points
ID: 21848642
make sure you have the following

SET NOCOUNT ON
SET FMTONLY OFF
0
 
LVL 4

Expert Comment

by:zx10r
ID: 21848704
SET FMT ONLY OFF
SET NOCOUNT ON
EXECUTE sp_ProcName

or you can add it directly in your procedure
0
 
LVL 65

Author Comment

by:Jim Horn
ID: 21848858
>SET NOCOUNT ON
Already had it.

>SET FMTONLY OFF
Wowwie, that works great.  Thanks.
0
 
LVL 4

Expert Comment

by:zx10r
ID: 21848905
I had the same problem a week ago. So yeah, i know how you feel =)
0
 
LVL 14

Expert Comment

by:Jagdish Devaku
ID: 21849000
Hi,

I think using of table variables will solve the issue.

So  replace the temp tables with table variables. (replace #temp table with @table variable)

all the best.

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now