an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > CustomField Update in SQL-Server MS
Last Post 3/14/2011 11:45:56 AM By lukezy. 3 replies.
3/11/2011 10:56:28 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
CustomField Update in SQL-Server MS
 Hi Luke,
 
I have created a custom field called ProductInfo. The thing is that it should not be null when running a SQL XML.modify ..... command.
 
Do you have a SQL comment to update a custom field.
 
I run this command and it does not work.
 
update DSC_Product
set CustomFields.modify('replace value of (//ProductInfo/@value)[1] with '''AAAAAAAAAAA''')')
where sku = 123456
 
It shows 1 row affected but no data updated on custom filed. The only way is by admin and it is a time consuming job.
 
How does update customfield works on admin and not from SQL server MS
 
Thanks
3/14/2011 11:37:32 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: CustomField Update in SQL-Server MS
Why are you using SQL script to update? Can you use the admin UI?
DotShoppingCart Staff
3/14/2011 11:42:37 AM
Bahram
Posts: 878
Joined: 12/8/2008
Location:Vancouver, BC Canada
Re: CustomField Update in SQL-Server MS
There are 50 or more products that I need to update custom field for them. Actually It is a SQL-Server problem as they already mentioned it in their forums.
Anyway I have staredt doing it now in admin. What SP or wuery admin module uses to update XML filed?
 
Thanks,
 
3/14/2011 11:45:56 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: CustomField Update in SQL-Server MS
You should take a look at SQL books online for the proper SQL script to update XML field.
DotShoppingCart Staff