Adding parameterized values. Which is more secure.

R

Ryan Taylor

Hello.

Adding some data to a sql server 2000 table. Is the later more secure than
the former? If so, why?

SqlCommand sqlCmd = new SqlCommand(update, sqlConn);

sqlCmd.Parameters.Add("@hashedPass", user.HashedPassword);



SqlCommand sqlCmd = new SqlCommand(update, sqlConn);

sqlCmd.Parameters.Add("@hashedPass", SqlDbType.NVarChar, 255).Value =
user.HashedPassword;



Thanks in advance.

Ryan Taylor
 
R

Raterus

You would get a better answer on microsoft.public.dotnet.framework.adonet, but I don't think it really matters. Adding the extra values just allows sql server to more efficiently process the parameters, it doesn't do anything more to secure it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,814
Members
47,358
Latest member
AlexSon

Latest Threads

Top