Skip to main content

DTS Package - 'Invalid Pointer' error

Earlier this morning, I was creating a DTS package to get data from a particular query and inserting in to an Excel File. The query worked just fine in Query Analyzer and the Excel table (worksheet) column definition also exactly matched the query output. But, as it always happens - an error keeps on popping up when you are in time crunch, I kept on receiving 'Invalid pointer' error.

I tried changing the variable names, data types etc and nothing worked. Finally I realized that the cause of failure was some sort of unwanted output from executing the query.

I fixed this issue by adding SET NOCOUNT ON towards the top and SET NOCOUNT OFF at the bottom of my query!

Hope this post will be useful to you at some point in time!

Comments

Anonymous said…
Thanks, it is very useful.
Anonymous said…
Thanks! it worked perfectly.
Blogger said…
Wondering how did you find my blog?! Just curious - i have tried searching for this blog entry on google and did not find it!
Anonymous said…
I googled: dts package invalid pointer
Blogger said…
Thanks Anon!
m said…
Good one!! Thank you!! :)