Click here to Skip to main content
15,886,639 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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 / asp.net application with C#.net.

can any body help on this requirement.

Thanks in advance,
Bala.
Posted

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900