Geeks With Blogs
ken spencer

I love TSQL. Its really cool.

I have switched gears and now  am working an converting a large asp classic project to MVC / vb.net. Interesting.

So, I am reworking the sql into a repository set of classes.  As I do I need to 1) exec stored procedures to test them and 2) get a list of the parameters to setup sqlclient parameters.

Item no 1 is easy. I can just use exec to fire the sproc:

exec dbo.someSproc  1,20

And now to get the list of parameters:

exec sp_helptext someSproc

This give me the sprc in the output window where I can copy the params and anything else.  I usually copy and paste the params from the sproc right into the method I am working on then copy and past the param names into the sqlclient params to make sure there's no errors.

Its also handy to sometimes use MS Word to handle TSQL output and massage it there and then paste it back to whatever code you are using.

Posted on Tuesday, March 22, 2011 4:01 PM | Back to top


Comments on this post: SQL Server: Sp_HelpText

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © xamlnotes | Powered by: GeeksWithBlogs.net