Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 25th, 2004, 08:21 AM
ak ak is offline
Authorized User
 
Join Date: Sep 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default efficiency qn:ado .AddNew VS INSERT in stored proc

Hi
(i have posted this in the database section..apologies for duplicate)
1. is the method below in example available to use in asp? if so is it more efficient for large number of inserts then using the INSERT statement in stored procedures?
example:
   With objADORS
     .AddNew
        .fields("BookTitle") = "Title"
        .fields("Publisher") = "Publisher"
        .fields("DateOfPurchase") = "DateOfPurchase"
     .Update
   End With


ak
__________________
ak
 
Old February 25th, 2004, 10:08 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I never use AddNew - its more resource intensive and slower than a direct SQL Insert.

Quote from Microsoft's "Platform SDK: Internet Information Services 5.1 - Data Access Performance" sums it up for me:
Quote:
quote:
To optimize performance, avoid using the ADO record addition and deletion methods, such as AddNew and Delete. If your application adds and deletes records intensively, your application will perform better if it uses direct SQL statements, such as INSERT.
rgds
Phil





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling an insert stored proc from a select stored dzitam SQL Language 10 April 2nd, 2007 12:39 PM
Poor performance with ADO stored proc. call aldovalerio VBScript 0 August 23rd, 2004 08:21 AM
efficiency qn xml vs sql server - to record counts ak Classic ASP Databases 3 March 3rd, 2004 05:26 PM
efficiency qn - writing and saving xml file ak Classic ASP XML 1 March 2nd, 2004 05:26 PM
effieciency: ado .AddNew vs Insert in Stored proc ak SQL Server ASP 2 February 25th, 2004 09:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.