Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript 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
  #1 (permalink)  
Old August 23rd, 2004, 08:21 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Poor performance with ADO stored proc. call

I've got a SQL Server 2000 DTS package that has an ActiveX Script task written in VBScript that inserts rows into a table. I've tested it with
1) an explicit "INSERT INTO " command with objCommand.CommandType = adCmdText
2) a stored proc. call with objCommand.CommandType = adCmdStoredProc and parameter objects
3) a stored proc. call in a text string with objCommand.CommandType = adCmdText (e.g., ins_tblStage_TestResult5 'CAN001',123,etc.)

Methods 2 and 3 above take approx. 5 times longer than method 1. I've programmed a lot of ADO in VB6 and my experience there was that ADO calls to stored procs. with parameter objects is very efficient.

Is there a performance issue with calling a stored proc. with ADO from VBScript? My stored proc. does a IF NOT EXISTS prior to inserting the row. I create the command and connection objects outside my insert loop, and create the objCommand.CommandText inside the insert loop.

Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
add new record to ADO recordset via stored proc tbullard Access 0 January 20th, 2006 02:35 PM
stored proc c# call issue ace333 Classic ASP Databases 0 October 5th, 2005 07:53 AM
efficiency qn:ado .AddNew VS INSERT in stored proc ak Classic ASP Databases 1 February 25th, 2004 10:08 AM
effieciency: ado .AddNew vs Insert in Stored proc ak SQL Server ASP 2 February 25th, 2004 09:20 AM
Help! Stored Proc performance is very slow. pjmair SQL Server ASP 0 December 18th, 2003 12:51 PM





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