I'm writing a quick website in ASP (classic) Javascript.
I'm using a prepared statement with a parameter. Nothing special.
My question is do I need to sanitise the input to the parameter (if so, are there any native functions for this like in PHP?), or does the fact I'm using a parameter rather than concatenating inline SQL make me safe?
//Set up the command to run the GetMigrationDate stored procedure.
var command = new ActiveXObject("ADODB.Command");
command.CommandText = "exec myStoredProc ?";
//Set up parameters
command.Parameters.Append(command.CreateParameter("name", 200, 1, 255));
command.Parameters("name") = name;
//Set up result recordset
var results = new ActiveXObject("ADODB.Recordset");
//Run command
results.open(command);
[Edit] The stored proc is something like this:
@name varchar(255)
select * from customers where name = @name