SQL Querey Help

Im trying to update a price of an item based of the name however the query works fine in SQL managment studio, however in samba scripts It doesnt seem to do anytthing and Im not sure how to debug.

So here my query:

 UPDATE p SET [Price] = 32.9 FROM    [MenuItems] i, [MenuItemPrices] p  WHERE  i.id = p.id AND i.Name = 'Small Hot Chocolate'"

And heres my code in samba scripts:

function localUpdate(){ var qry = "UPDATE p SET [Price] = 32.9 FROM [MenuItems] i, [MenuItemPrices] p WHERE i.id = p.id AND i.Name = 'Small Hot Chocolate'"; sql.Query(qry); }

If sql.Qurey is not the write command, is there anytinh else I could use or if not @emre do i need another helper.

sql.ExecSql(qry); is the jscript part.

Thankyou, time to upload a tutorial :slight_smile: