I developed an application where users can select specific tables to do backup and export to textfile for selected database and selected server.
My form contains a list of servers available within the network and on user selection of server corresponding databases will be displayed and when user selects the database then corresponding tables will be displayed and user can select the tables he want to do backup and when enters execute button it does all backup and exports to a text file.
Now I want to modify my program slightly when user selects database,if database contains stored procedures it should display list of all stored procedures in the selected database and should do the backup of them and export to a textfile.
Please give me any ideas to achieve this.
you could use the SMO namespace which contains all you need to do that and much more
Add a reference to that namespace first
more info at
http://www.sqlteam.com/article/scripting-database-objects-using-smo-updated