[book] updated FAQ 'How to reset the password for user joe' with SQL Server syntax stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Tue, 28 Sep 2010 12:22:17 +0200
branchstable
changeset 6350 74575fb32a4d
parent 6349 14ec625b3f55
child 6351 eb79fb69c2b2
[book] updated FAQ 'How to reset the password for user joe' with SQL Server syntax
doc/book/en/annexes/faq.rst
--- a/doc/book/en/annexes/faq.rst	Tue Sep 28 08:36:24 2010 +0200
+++ b/doc/book/en/annexes/faq.rst	Tue Sep 28 12:22:17 2010 +0200
@@ -402,6 +402,12 @@
     mydb=> update cw_cwuser set cw_upassword='qHO8282QN5Utg' where cw_login='joe';
     UPDATE 1
 
+if you're running over SQL Server, you need to use the CONVERT
+function to convert the string to varbinary(255). The SQL query is
+therefore::
+
+    update cw_cwuser set cw_upassword=CONVERT(varbinary(255), 'qHO8282QN5Utg') where cw_login='joe';
+
 You can prefer use a migration script similar to this shell invocation instead::
 
     $ cubicweb-ctl shell <instance>