Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 scrypt generation

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-06-10 : 06:42:40
ali writes "how i can generate a script from a button of data base"

mr_mist
Grunnio

1870 Posts

Posted - 2005-06-10 : 06:44:21
Right click in EM and choose "generate sql script".

Sigh.

-------
Moo. :)
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-06-10 : 06:47:25
After running this through the Yoda-speak translator, I figured out that you want to add a database scripting feature to your application. The SQL-DMO object library provides a way to generate scripts of all database objects (this is how Enterprise Manager does it). The general approach involves connecting to the database via SQL-DMO and enumerating all of the objects/collections (tables, views, procedures, etc.) Each object has a Script method you would call to create the script for it.

Books Online has examples under "script method" and in the Table of Contents under "Building SQL Server Applications, SQL-DMO". I'm pretty sure Nigel has something on his site too:

http://www.mindsdoor.net
Go to Top of Page
   

- Advertisement -