Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 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 June 27th, 2003, 08:25 AM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Facing problem with commandtimeout

Even after setting the commandtimeout property of connection object to 35 seconds my query goes on executing for more than the specified period.Following is the code i am using

dim objcon, objrs, cmd
set objcon = Server.CreateObject("ADODB.Connection")
set objrs = Server.CreateObject("ADODB.RecordSet")
set cmd = Server.CreateObject("ADODB.Command")
objcon.ConnectionString = "Provider=SQLOLEDB; Data Source=TestDB; Database=test; user id =aspguest;pwd=aspguest"
objcon.Open

cmd.ActiveConnection = objcon
cmd.CommandText = "select * from temp"

cmd.CommandTimeout =40
set objrs = cmd.Execute

Any help would be greatly appreciated.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Facing Problem in WSAD mvharish J2EE 0 May 25th, 2007 04:24 AM
i am facing a problem mkazim85 SQL Language 2 April 20th, 2007 07:28 AM
Facing problem with tomcat 5.5.9 bhojrajjoshi Apache Tomcat 14 September 26th, 2006 04:44 AM
Facing problem with commandtimeout altaf SQL Server ASP 0 June 27th, 2003 08:33 AM
Facing problem with commandtimeout altaf Classic ASP Databases 0 June 27th, 2003 08:27 AM





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