Generate Create Table script programatically.

Pertaining to question,

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

Improve company productivity with a Business Account.Sign Up

Alex-w474Connect With a Mentor Commented:
This will help:
I've used it the past.
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.

sepknowAuthor Commented:
I prefer Rob's solution. Thanks both of you.
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.