sql - Node.js mssql parameterized query not working with ALTER LOGIN statement -


i'm trying alter someones login using mssql , parameterized queries, keep getting error when try run this:

    var request = new sql.request(connection);     request.input('thepassword', sql.varchar, newpass);      request.query('alter login ' + user + ' password = @thepassword' ,function(err, recordset){         if(err){             console.log(err);             callback(false);         }         else{             callback(true);         }     }); 

'newpass' string passed in through function paramter. error keep getting this:

requesterror: incorrect syntax near '@thepassword'. 

anyone know why happening?


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -