Background:

I am doing all this with SSOM (Sever side object model) in C# console app.
And I have a connection to and empty database which will be initialy populated and than updated as needed.

On SharePoint server there are a couple lists among which there is a "List Of Headers" that contains the name of all other lists. Other lists are catalogs of articles.

Headers List contains around 40 fields or so (Title, TypeOfCatalog, CatalogName, CatalogID,... so on)

Other Catalog Lists contain around 300 fields (CatalogId, ArticlePrice, ArticleName,... and so on)

Here's the code from the class i use:

```
 public class SharePointProduction
 {
    private static XYZ_Entity _context = new XYZ_Entity();

    public static void Main()
    {           

        string siteURL = "http://somesite.local/sites/promo_tool";          

        try
        {
            using (SPSite site = new SPSite(siteURL))
            {
                using (SPWeb web = site.OpenWeb())
                {          

                    GetSharePointCatalogHeaders(web);

                    Console.WriteLine("Press any key to continue...");

                }
            }
        }
        catch (Exception)
        {
            PrintErrorSharepointConnection();
            PrintPressKeyToExit();
        }
        finally
        {
            Console.ReadKey();
        }
    }

```

GetSharePointCatalogHeaders METHOD -----------------

```
private static SPListItemCollection GetSharePointCatalogHeaders(SPWeb web)
    {

        var catalogHeaderList = web.Lists.TryGetList("Headers List");

        if (catalogHeaderList == null) throw new Exception("Unable to get catalog headers used for checking status of catalogs");

        var catalogHeaderItems = catalogHeaderList.GetItems("Id", "_x0160_ifra_x0020_artikla", "Naziv_x0020_artikla", "Katalog_x002f_ID", "Status_x0020_kataloga", "Datum_x0020_po_x010d_etka_x0020_");

        return catalogHeaderItems;
    }

```

So far, that's what I got.

I need to update Headers List in one table in database called "Headers", and other lists (Article Catalogs) to a "Catalogs" table.

To be clearer (I do apologize, English is my second language):