[Request] SQL syntax

06/17/2015 17:59 SkuulCandy#1
Hi, anyone have this sql syntax :
Code:
UPDATE PS_GameData.dbo.CharItems SET CraftName = Craftname + '" & TextStat.Text & "' WHERE  (CharID,ItemID) value ('" & TextCharID.Text & "','" & TextItemID.Text & "')
I would like this :
When i click on my button named 'STR' this query will be executed into my db.
Example if i right '50' into TextStat.Text when i click on 'STR' button Craftname of ItemID = TextItemID.Text where CharID= TextCharID.text will be updated. SO it's doesn't work because craftname doesn't work like that. And anyone have this party of my sql syntaxe can be work :
Code:
SET CraftName = Craftname + '" & TextStat.Text & "'
Thanks :)
06/17/2015 20:12 nubness#2
[Only registered and activated users can see links. Click Here To Register...]

Code:
-- UPDATE STR
UPDATE CharItems
SET Craftname = @STR + SUBSTRING(Craftname, 3, 18)
WHERE ItemUID = @ItemUID

-- UPDATE DEX
UPDATE CharItems
SET Craftname = SUBSTRING(Craftname, 1, 2) + @DEX + SUBSTRING(Craftname, 5, 16)
WHERE ItemUID = @ItemUID

-- UPDATE REC
UPDATE CharItems
SET Craftname = SUBSTRING(Craftname, 1, 4) + @REC + SUBSTRING(Craftname, 7, 14)
WHERE ItemUID = @ItemUID
06/17/2015 20:23 SkuulCandy#3
Since 2013 my Shaiya Developper not Vb net.