Try Now
More in this section

Forums / Set-up & Installation / SQL table for Generic Content

SQL table for Generic Content

2 posts, 0 answered
  1. John Gough
    John Gough avatar
    5 posts
    05 Mar 2009
    10 Jun 2009
    Link to this post
    I've struggled to get the entire db on the hosting machine.  Massive page content changes have taken place on a "local" dev machine... I'd like to extract only the table schema/data needed and run the "update" query on the host SQL machine.  Any ideas which table(s) I'd need to address (Generic Content changes only)?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    19 Oct 2016
    15 Jun 2009
    Link to this post
    Hi John Gough,

    The best way is using Data comparison tool that will track all changes between your development server database and your production database.
    If you have made changes only to the IContent items and you want to get all items from your dev server to the production you could try the following: Create a new connection string that points to your dev server db. Then for GenericContent create a new provider that will get the database from your dev server. Create a user control that will copy all items from the newly create provider to a prvider that will be used on a production.

    Sample code:

                 ContentManager managerDev = new ContentManager("DevProvider"); 
            ContentManager managerProd = new ContentManager("PrductionProvider"); 
            IList listofDevItems = managerDev.GetContent(); 
            for (int i = 0; i<listofDevItems.Count; i++) 
                IContent copyContent = (IContent)listofDevItems[i]; 

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered