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, 197 days ago
The estimated time to read this article is 3 minutes

Visual Basic – Query Timeout
  • 0.00 / 5 5
0 votes, 0.00 avg. rating (0% score)

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

Visual Basic – Query Timeout
  • 0.00 / 5 5
0 votes, 0.00 avg. rating (0% score)

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: 20/2/2017 Last updated: October 11, 2011 at 12:23 pm Get helped -
+ +