Can someone tell me how to copy an MS Access table\'s table structure and all its constraints, keys, and etc. using .NET or SQL? I have searched and found a number of ways o
I would use the upsize wizard with MS Access
http://support.microsoft.com/kb/237980
You can "export" to the same database, which will create a copy with all indexes etc, but not relationships.
// Start a new instance of Access for Automation
oAccess = new Access.Application();
// Open a database
oAccess.OpenCurrentDatabase(@"z:\docs\test.accdb");
oAccess.DoCmd.TransferDatabase(
Access.AcDataTransferType.acExport,
"Microsoft Access",
@"z:\docs\test.accdb",
Access.AcObjectType.acTable,
"table1",
"newtable",true,false);