Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 5 of 5

Thread: Import

  1. #1
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default Import

    Is it possible to import directly into the category table or does a script alter multiple tables when creating a category through the admin portal?

  2. #2
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    If all you're doing is creating a category you can insert it directly into the DB. Once you get into mapping products to the category, you'll also need the ProductCategory table.

  3. #3
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    Due to the CatID being an identity I am unable to import into that field. Any suggestions?

  4. #4
    AspDotNetStorefront Staff - Scott's Avatar
    AspDotNetStorefront Staff - Scott is offline Administrator
    Join Date
    Mar 2007
    Location
    Ashland, OR
    Posts
    2,390

    Default

    You can insert into identity fields, you just have to turn that on:

    Code:
    set IDENTITY_INSERT [dbo].Category ON;
    INSERT [dbo].Category(CategoryID,column,column,column,column,column,column, etc) values(value,value,value,value,value,value,value, etc);
    set IDENTITY_INSERT [dbo].Category OFF;

  5. #5
    chrismartz is offline Senior Member
    Join Date
    Apr 2010
    Posts
    339

    Default

    Thanks Scott!!!

    That must be new to 2k5 or 2k8? I jumped from 2000 to 2008.