Generate SQL vs Script Methods

  • Would someone kindly clarify these statements from SQL7 BOL?

    1. Use the GenerateSQL method when capturing object definition. Use the Script method when capturing an image of an exiting (sic) component. (Script Method (SQL-DMO))

    2. The GenerateSQL method generates a Transact-SQL batch that creates a database. The method fails if the Database object used references an existing SQL Server database. Use the Script method of the Database object to create a Transact-SQL command batch defining an existing database. (GenerateSQL Method (Database) (SQL-DMO))

    Say what????

    I don't understand the distinction.

    Thanks!

  • Not a DMO guru, but it appears script is for dbs (existing) and generate is for other objects.

    Is definitely poorly written.

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

    http://www.dkranch.net

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply