Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server ASP
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 25th, 2004, 08:18 AM
ak ak is offline
Authorized User
 
Join Date: Sep 2003
Location: London, , United Kingdom.
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
Reply With Quote
  #2 (permalink)  
Old February 25th, 2004, 09:18 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
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
Reply With Quote
  #3 (permalink)  
Old February 25th, 2004, 09:20 AM
ak ak is offline
Authorized User
 
Join Date: Sep 2003
Location: London, , United Kingdom.
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by joefawcett
Joe
thanks Joe


ak
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:58 AM.


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