I require to create through ADO.NET a temp table, perform a BulkCopy
and then a Merge
on the server between the temp and the actual table.
Problem is creating the temp table dynamic using pure ADO.NET. The schema should be the same as the existing table, but this table is created using an ORM (NHibernate or Entity Framework, we're not sure yet). This also means that the schema can change in the future.
Is there any way to create a table in the database using plain ADO.NET objects? Such as a DataTable
containing the schema of the original table?
Any information pointing me in the right direction is appreciated.