Solved

Generate Create Table script programatically.

Posted on 2008-06-18
3
1,462 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding where clause to entity statement c# 1 48
Find unused columns in a table 12 74
Special characters in a TCPDF 4 27
Need to trim my database size 9 26
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
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…

733 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