You are here: Timeout Expired « MsSQL Server « IT news, forums, messages
Timeout Expired

Posted by cheesey_toastie on 03/30/06 19:39

Hi,

I'm connecting to a SQL server (7.0) from Excel and VBA.

I've checked the VBA and don't think I've got this wrong but I keep
getting a Timeout Expired error message. Is there a setting in SQL
that I am not aware of that I need to set? Could it be the connection
string I use?


The connection string is

Sub SQLConnection()

Dim strConnection As String
Dim Catalogue As String

Dim sSQL As String
Set SQLConn = New ADODB.Connection ' Connection Object

strConnection = "Provider='SQLOLEDB';Data Source='TEST\TEST';Initial
Catalog=composites;User ID=sa;pwd=mypassword"


SQLConn.ConnectionString = strConnection
SQLConn.ConnectionTimeout = 0 ' wait indefinately?
SQLConn.Open


End Sub


The point at which I get the time out is when I run a large update
query

SQLConn.Execute CreateSQL(i + 1)

CreateSQL is a function that updates a table with a million or so
records and about 30 inner joins (takes approx 40 seconds to execute
through Query Analyser).


Any Help much appreciated!

ct

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация