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 3 of 3

Thread: Updating Quantities direct from local database to aspdotnet db

  1. #1
    rcc866 is offline Junior Member
    Join Date
    May 2012
    Posts
    3

    Default Updating Quantities direct from local database to aspdotnet db

    I am looking to automate updating my quantities on the shopping cart without having to do an import from excel. I would like to create a local query that pulls the quantities out of my back-end database and updates the quantities on the shopping cart database. I can do it when both db reside on my server (which i did for my local test site) but when I tried to run it on the production site, it did error out. Does anyone have experience with this? Below is a test query I did locally.


    UPDATE [dbo].[ProductVariant]
    set Inventory = [companyDB].[DBO].ITMFIL.ITEM_RT_QTY_ON_HND
    from [dbo].[ProductVariant] AS V inner join [DBO].Product AS P ON V.ProductID = P.ProductID
    INNER JOIN [companyDB].[dbo].ITMFIL on P.SKU = ITEM_NO
    where P.SKU = 'PART-1234'

    I did this in the management studio while connected to the live db. I did put the local computer name but got an error message stating that the computer name was not in sys.systems.

    Any help would be great.

    Thanks

  2. #2
    jsimacek is offline Senior Member
    Join Date
    Dec 2008
    Location
    Phoenix, AZ
    Posts
    373

    Default

    Hmm, does the SQL user you are using from your local have access rights to the other databases?
    Jan Simacek - Compunix, LLC
    AspDotNetStorefront trusted Devnet Partner and Reseller since 2005

    AspDotNetStorefront Mods and Add-Ons at http://www.ecommercecartmods.com/
    - Searching, Filtering and Sorting (like cSearch, Dealer Locator, Price Ranges, Blog)
    - Reports (like Cart Abandonment and Net Sales)
    - Customer Experience (like Question/Answers)
    - Site and Data Management (like Entity Product Mapper, Bulk Updaters, Make/Model/Year filters)

  3. #3
    rcc866 is offline Junior Member
    Join Date
    May 2012
    Posts
    3

    Default updating quantities

    Quote Originally Posted by jsimacek View Post
    Hmm, does the SQL user you are using from your local have access rights to the other databases?
    I can sign onto each database thru the Management Counsole and perform perform any updates by themselve but when I try to combine both into one sql statement, it error out. I am getting the following error

    Msg 7202, Level 11, State 2, Line 1
    Could not find server 'companyDB' in sys.servers. Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers.