SQL Data Access

  • Thread starter Thread starter Kenneth Keeley
  • Start date Start date
K

Kenneth Keeley

Hi,
Is it safer to use an SQL Stored Procedure or to create the querry in
asp.net code? Which would run faster? and what is the best way to protect my
SQL server from hackers.

Thanks for any help.
Kenneth Keeley
 
Kenneth,

Use Stored Procedure's with the command objects in ADO.Net. You can give the sql user no rights except to execute those SP's. Running raw SQL is always a risk and runs slower cause SQL doesn't have a pre-built query plan.

-Calvin Luttrell
ProjectThunder.com
 
Back
Top