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!
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