Click here to Skip to main content
12,694,691 members (32,898 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#2.0 C# ASP.NET
Hi All,

I need to retrieve particular stored procedure by inputing the sp name
Ex :- sp_helptext 'spname' from sql server and need to save as text file.

using console / windows / application with

can any body help on this requirement.

Thanks in advance,
Posted 27-Sep-12 8:09am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

What part of the process is a problem for you. We're certainly not going to write all the code for you. That is your job. We can help you with issues that arise while writing.
Your initial steps would be:
1) Make sure you have a working connection string to the database in question and ensure that the credentials used have privileges to run the sp_helptext procedure.
2) Create your C# project.
3) Add your connection string to the web.config or app.config depending on which process you decide to use.
4) Write your code to execute the procedure and write the results to a file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170118.1 | Last Updated 27 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100