Hi,
I was wondering if there was a function in SMO to script the entire contents of a table.
What I would like to achieve is to select the table in my App and give an option to script the entire contents of the table including primarykeys constraint etc.
Any suggestions would be very much appreciated.
Thanks

How Can i script the contents of table ?
-M-
Try various scripting options (properties of the ScriptOption class), such as ScriptOption.Default + ScriptOption.DriDefaults + ScriptOption.WithDependencies + ScriptOption.DriPrimaryKey + ScriptOption.DriNonClustered + ScriptOption.DriForeignKeys + ScriptOption.DriUniqueKeys + ScriptOption.SchemaQualify + ScriptOption.DriChecks
and so on.
Joku
I will try now
nemesisv
The reason PrimaryObject exists is that is allows you to script Table Indexes without the table, etc.