Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / February 2005



Tip: Looking for answers? Try searching our database.

CommandTimeout for Oracle

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Markus Ewert - 21 Feb 2005 12:41 GMT
My environment: WIN XP SP2, VB6 SP5, MS ADO 2.5, Oracle 9.i, MS ODBC
for Oracle 2.575

I have a VB application in which I connect to a Oracle database via
ADO and ODBC. I used to use the ODBC driver from Oracle, but for some
reason I MUST use the ODBC driver from MS for Oracle now. Recently I
noticed, that the CommandTimeout property of the ADO-connection (as
well as ADO-command) object is not evaluated. With the ODBC driver
from Oracle I received a timeout error (as expected), when the SQL
statement took too long. However, the ODBC driver from MS for Oracle
doesn't care about the timeout property. My application is locked as
long as the statement needs to execute. Is there any way to get the MS
driver to evaluate the timeout property?

Here is my example code:

   Dim cnn As ADODB.Connection
   Dim cmd As ADODB.Command
   Dim strConnect As String

   Set cnn = New ADODB.Connection
   Set cmd = New ADODB.Command
   strConnect = "DSN=MyMSOraDSN;User ID=MyUser;Password=MyPwd;Initial
Catalog=MyScheme"
   cnn.ConnectionString = strConnect
   cnn.Open
   cnn.CommandTimeout = 1
   Set cmd.ActiveConnection = cnn
   cmd.CommandTimeout = 1
   cmd.CommandText = "Select * From vwLastTooLong"
   cmd.Execute
   cnn.Close

Thanks!
Markus
Val Mazur - 26 Feb 2005 02:12 GMT
Hi Markus,

Check this out

http://support.microsoft.com/default.aspx?scid=kb;en-us;251248

Signature

Val Mazur
Microsoft MVP

http://xport.mvps.org

> My environment: WIN XP SP2, VB6 SP5, MS ADO 2.5, Oracle 9.i, MS ODBC
> for Oracle 2.575
[quoted text clipped - 31 lines]
> Thanks!
> Markus
 
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



©2009 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.