This project is read-only.

Importing SQL data and setting items to published

Topics: Administration, General
Dec 10, 2012 at 2:48 PM

Hi There

We are migrating our current solution to be using orchard cms.

The old website has data that is required in the orchard website.

I have creating modules for the the new structure and created class and models for the Content and non-content data.

So basically everything including the tables are all in sync with the old system.

What I have done now is used SQL SSIS package to import the data from the old system into the orchard CMS database tables that were created during the migrations.

The problem is now that the content records were not created and the items dont show up in the admin section, but they are in the tables.

Is there a way to publish that data either through code or any other way and create content records for that data.




Dec 10, 2012 at 3:11 PM
Edited Dec 10, 2012 at 3:30 PM

If you use a recipe all that will be taken care of for you. You can use 'for xml' SQL queries to generate the recipe files.

The problem with doing it the way you have done is the content part records aren't associated with content item records, and if you have any attached parts to your content types, such as common part, autoroute part, etc, those parts won't exist unless you inserted them manually into the sql tables. If these are content part records, the table should have an "Id" column that is an FK to the content items table. Did you leave the 'Id' column blank?

Dec 10, 2012 at 3:32 PM

Im importing from a non orchard database to a orchard database.

I imported them straight into the tables and enabled identity insert on the tables as there are joins that we require.

I have been checking and understand how the content records work , I am gonna have to figure out a different way of using the data maybe just have them as non content data.


"You can use 'for xml' SQL queries to generate the recipe files."

What exactly is this as the only place I see the ability to import recipes is in the import/export module.