Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Sql server SP - Results to file

Status
Not open for further replies.

Gutes

Programmer
Dec 5, 2001
16
AR
How can I execute a stored procedure and store the results in a text file (same thig that we can do from the Query analyzer)

The problem is that I can run a command from VB, but really don´t know how to capture the query output (not the dataSet)
 
But the DataSet IS the output of the Query (in .NET; in VB6 is a recordset).
You can save the recordset, depending of the ADO version, in "binary" format or XML format.
 
You can also use a DTS package to do this. Then, if you must have it in VB you can save your DTS Package as a .bas file and then import it into your VB Project. Post back if you are interested in this solution and need help with it.
 
Ok. I know that the DataSet is THE result of the query (in .NET)

Now, with the recordset, I'm Ok. The thing i want to do is to store the messages that the query returns when doing an insert statement (for example:

Insert.....

1 row(s) affected
)

I´m interested in your solution bjd4jc, I'd appreciate you could give me more information about it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top