Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
|
SQL Server ASP Discussions about ASP programming with Microsoft's SQL Server. For more ASP forums, see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server ASP 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:18 AM
ak ak is offline
Authorized User
 
Join Date: Sep 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default effieciency: ado .AddNew vs Insert in Stored proc

Hi I have a few quetsions:
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, 09:18 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Every article I have read states that using the database's inherent code, i.e. a stored procedure or running a sql statement to do the update is far better than using ADO as in your post. It certainly is quicker when you need to do multiple inserts although I have never seen benchmarks for just one row.

--

Joe
 
Old February 25th, 2004, 09:20 AM
ak ak is offline
Authorized User
 
Join Date: Sep 2003
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by joefawcett
Joe
thanks Joe


ak





Similar Threads
Thread Thread Starter Forum Replies Last Post
A select and then an insert in a stored proc smacks SQL Server 2005 3 July 21st, 2007 07:31 PM
Calling an insert stored proc from a select stored dzitam SQL Language 10 April 2nd, 2007 12:39 PM
add new record to ADO recordset via stored proc tbullard Access 0 January 20th, 2006 02:35 PM
Poor performance with ADO stored proc. call aldovalerio VBScript 0 August 23rd, 2004 08:21 AM
efficiency qn:ado .AddNew VS INSERT in stored proc ak Classic ASP Databases 1 February 25th, 2004 10:08 AM





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