Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stored Proceedure or SQL in a component

Status
Not open for further replies.

prover

Programmer
Joined
Sep 12, 2001
Messages
54
Location
US
Hi All,

In a component, is it better to use a stored procedure to add, update and delete records or to just type the sql statement (ex: delete from table where ...)?

Am I assuming (rightly?) that because a .dll is compiled it'll run a sql statement just as fast as a stored procedure? Is the stored procedure redundent?
 
IMHO, a stored procedure is the better way to go. If the database logic changes for any reason, only the stored procedure being called will need to be changed on the SQL Server. If the SQL statement is in the front-end code, then the application code will need to be recompiled and deployed to all desktops that currently have it. Normally it's best to keep database functionality within the database and let the front-end handle the presentation.

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top