VB Components vs. Stored Procedures

Results 1 to 3 of 3

Thread: VB Components vs. Stored Procedures

  1. #1
    Join Date
    Dec 1969

    Default VB Components vs. Stored Procedures

    Hi,<BR>I have a question about the performance with VB Components and Stored Procedures.<BR>In terms of performace and also of transaction security, which method is better to use?<BR>For example, you can make a VB component to just simply insert or delete a record set or you can just use a stored procedure to perform the same task.<BR><BR>Can anyone please compare these two methods?<BR><BR>Thank you in advance!<BR><BR>Michelle<BR>

  2. #2
    Steve Cimino Guest

    Default Sprocs all the way

    Much like the speed difference between interpreted languages and compiled languages, stored procedures fall into the latter category. Much quicker.<BR><BR>Also, I like them better for readability. If you have users of all levels trying to access the same data, it&#039s much easier for them to put the name of the sproc and some parameters than for them to write out their own SQL Statement. Plus color coding helps out while writing sprocs, in addition to an immediate (although sometimes buggy) syntax check.<BR><BR>Another benefit is security. You may set up the user to only have rights to the stored procedure, while keeping them out of your table. This is good because different users may have different levels of access to data, whereas if you give the SELECT power to a table, they can view everything to their heart&#039s content. Not true with a sproc... you can give different users different sprocs with different SELECT statements, etc.<BR><BR>I use stored procedures in 100% of all cases. Some may argue that this isn&#039t the best idea due to scalability, but there are different views on this matter. I tend to agree it is equally scalable, but someone out there will disagree.<BR><BR>So performance, ease of use, security, and scalability... hands down winner, IMO.

  3. #3
    Nathen Guest

    Default RE: VB Components vs. Stored Procedures

    I agree with Steve, I&#039d use stored procedures over dynamically created SQL any day. SPs are compiled so the database server doesn&#039t have to generate the execution plan for the query because it&#039s already been generated. You were asking if you should use VB components or stored procedures. For maximum scalability and performance you should use both. All your data access logic should be in a VB component that is calling SPs on the database server. You should try to have more compiled code (VB & SPs) being executed than interpreted code (ASP).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts