I need to be able to retrieve a CREATE TABLE script to recreate a specific table in a SQL Server (2000) database, programmatically (I'm using C#). Obviously you can do this with Enterprise Manager but I would like to automate it.
I've been playing around with SQLDMO which offers a Backup command, but I'm not sure if this will give a SQL CREATE TABLE script and seems to require the creation of a SQL Service device, and I would prefer to avoid modifying the database.