About You - Tools - Profile - Gallery


http://www.heelpbook.net/feed   Valid RSS (HeelpBook) - visit http://www.heelpbook.com/feed   http://www.heelpbook.com/feed
   
 
Send Us a Sign! (Contact Us!)
Visual Basic - Query Timeout –> (Word) Visual Basic - Query Timeout –> (PDF) Visual Basic - Query Timeout –> (Epub) Visual Basic - Query Timeout –> (Text)
Visual Basic - Query Timeout –> (XML) Visual Basic - Query Timeout –> (OpenOffice) Visual Basic - Query Timeout –> (XPS) Visual Basic - Query Timeout –> (MHT)
This article has been published 4 years, 233 days ago
The estimated time to read this article is 3 minutes

0.00 avg. rating (0% score) - 0 votes

SCENARIO

I am programming with visual basic and I have a large query wich takes too long for execution. After 30 seconds I get a timeout error. Is there any way to raise the timeout to 90 seconds or something.

SOLUTION

On Error Resume Next
Set cn = New ADODB.Connection
cn.Provider = "SQLOLEDB"
cn.Properties("Initial Catalog").Value = "DatabaseName"
cn.Properties("Data Source").Value = "ServerName"
cn.Properties("Connect Timeout").Value = 90
cn.Properties("General Timeout").Value = 90
cn.Properties("Persist Security Info").Value = False
cn.ConnectionTimeout = 90
cn.CommandTimeout = 90
cn.Open

0.00 avg. rating (0% score) - 0 votes

SOURCE

LINK (dbforums.com)

LANGUAGE
ENGLISH
Visual Basic - Query Timeout Visual Basic - Query Timeout
Facebook Twitter Email Plusone Linkedin Stumbleupon Delicious Digg
   
© 2011 - 2013 HeelpBook - Today is: 28/3/2017 Last updated: October 8, 2011 at 18:43 pm Get helped -
+ +