Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Connection string - Query SQL Server with ADO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
arno - 22 Jan 2008 15:15 GMT
Hello,

what is the "best" method to query a MS SQL Server with Excel and ADO?

These are the options:

1) SQL native Client (ODBC)
2) SQL Server (ODBC)
3) Microsoft OLE DB Provider for SQL Server
4) .Net Providers (but I could not find a free one)

I have been using 3), however, I get a timeout after 30 sec with complicated
queries and I cannot find the reason for this. (I tested and did not get
timeouts with 2). There are no timeouts set to 30 on the SQL-Server, the
connection string etc.

regards

arno
arno - 24 Jan 2008 09:53 GMT
> 3) Microsoft OLE DB Provider for SQL Server

> timeouts 30 on the SQL-Server, the

the CommandTimeout property has to be set, otherwise the default of 30sec
will be used

Set cn = New ADODB.Connection
cn.CommandTimeout = 0   '0 = infinite, anything else are seconds

arno
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.