Solved

Generate Create Table script programatically.

Posted on 2008-06-18
3
1,459 Views
Last Modified: 2013-12-16
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?
0
Comment
Question by:sepknow
3 Comments
 
LVL 5

Accepted Solution

by:
Alex-w474 earned 250 total points
ID: 21818500
This will help:
http://www.eggheadcafe.com/articles/20040913.asp
I've used it the past.
0
 
LVL 15

Assisted Solution

by:rob_farley
rob_farley earned 250 total points
ID: 21818649
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
 

Author Closing Comment

by:sepknow
ID: 31468641
I prefer Rob's solution. Thanks both of you.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question