Solved

Generate Create Table script programatically.

Posted on 2008-06-18
3
1,457 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
Read about achieving the basic levels of HRIS security in the workplace.
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…

810 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