LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Timeout problems

Having timeout difficulties with a routine.
The routine queries data using a order number as the
criteria for the data in an SQL database over a LAN, and
pastes the information into a spreadsheet.
The routine works fine with the workbook unprotected and
not shared.
When the workbook is shared, and protected the routine
works fine for the majority of the time, but there are two
criteria situations where the result of the query returns
over 100 records and the routine fails at the set rst
=cmd.execute(),on timeout. It appears that the failure
happens after 30s. The query being run is a stored
procedure on the database.

Does anyone have any thoughts on how to extend the timeout
value for the connection?

The code I am using is below:

Set cn = New ADODB.Connection

cn.Open "Provider=SQLOLEDB;Server=XXXXX;Database=YYYY;uid= h
hh;password=0000 "

Set cmd = New ADODB.Command
cmd.ActiveConnection = cn
cmd.CommandText = "ABC SAMPLE"
cmd.CommandType = adCmdStoredProc
cmd.Parameters.Refresh
cmd.Parameters(1).Value = ActiveSheet.Cells(1,1)

Set rst = cmd.Execute()
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
TImeIn-TimeOut-TimeIn-TimeOut-HoursWorked ChefBoiRD Excel Worksheet Functions 3 September 20th 05 10:01 AM
COM server timeout Erich Neuwirth Excel Programming 0 July 6th 04 09:40 AM
Web Access Timeout Nigel[_6_] Excel Programming 3 February 28th 04 07:52 PM
Timein-Timeout Jim Stewart Excel Programming 2 September 1st 03 09:49 AM
Web query timeout Karyn Mak Excel Programming 0 July 16th 03 11:48 AM


All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"