Generate Create Table script programatically.

Pertaining to question
http://www.experts-exchange.com/Database/Miscellaneous/Q_22398914.html,

I would like to generate the script from C#. How can I achive this?
sepknowAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Alex-w474Connect With a Mentor Commented:
This will help:
http://www.eggheadcafe.com/articles/20040913.asp
I've used it the past.
0
 
rob_farleyConnect With a Mentor Commented:
If you're using SQL 2005, you should use SMO. It's really simple to use, and there are plenty of guides out there. The eggheadcafe one is for SQL 2000 and uses SMO's predecessor, SQLDMO.

Using SMO, make sure you investigate the ScriptingOptions to get the settings you need.

Rob
0
 
sepknowAuthor Commented:
I prefer Rob's solution. Thanks both of you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.