I have been having a very difficult time trying to get the output of a sql query that is in a DTS global variable to return, presently to a messagebox.
I created an Execute SQL task with the query I wish to use. The query has been tested in Query Analyzer and works fine and returns the results I am looking for. I set a global variable to the result set. Basically, I wish to display the results as a string or similar in a messagebox.
I have created the Execute SQL task as described in http://msdn.microsoft.com/library/en..._task_4gkl.asp
I have tried to retrieve the results using the example in
but I have been unable to do so.
I also tried the GetString method of the recordset without success.
I also tried the using the “Storing the resultset in a flat file” example from http://dotnetbips.com/displayarticle.aspx?id=228
and I was unable to write the recordset to a file.
What is the proper way to display a variable of type dispatch? I feel like I am going about this the wrong way.
I welcome suggestions and comments on how to achieve the goal of displaying the query results.