End Using
Cursor = Cursors.Default
Catch ex As Exception
LogException(ex)
End Try
Else
MessageBox.Show("Please select a provider.", "Database Callback", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
How do I retrieve the actual stored produce code, so the user can view the contents of the SP?
Connect to DB that your sp resides and execute the command
sp_helptext @objectname=YourSPName.
Here sp_helptext is system stored procedure to get the text of the given SP.
Programatically connect to the database and execute the SP sp_helptext and pass the parameter @objectname value as your sp name. The @objname has datatype as nvarchar(776). You will get the result as the SP text.
http://blog.sqlauthority.com/2007/05/25/sql-server-stored-procedure-to-display-code-text-of-stored-procedure-trigger-view-or-object/
this link might help you.
http://www.bishoylabib.com/2006/04/get-stored-procedure-code-from-sql.html
Thanks...