Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

CommandTimeout for Oracle

 
   Database Help (Home) -> Visual Basic -> ADO RSS
Next:  XML output  
Author Message
Markus Ewert

External


Since: Feb 21, 2005
Posts: 1



(Msg. 1) Posted: Mon Feb 21, 2005 5:41 am
Post subject: CommandTimeout for Oracle
Archived from groups: microsoft>public>vb>database>ado (more info?)

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

 >> Stay informed about: CommandTimeout for Oracle 
Back to top
Login to vote
Val Mazur

External


Since: Oct 31, 2003
Posts: 562



(Msg. 2) Posted: Fri Feb 25, 2005 9:12 pm
Post subject: Re: CommandTimeout for Oracle [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Markus,

Check this out

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

--
Val Mazur
Microsoft MVP

http://xport.mvps.org

"Markus Ewert" wrote in message

> 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

 >> Stay informed about: CommandTimeout for Oracle 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bind Variables ADO - Oracle - Hello, I am trying to call a stored procedure in Oracle from my Visual Basic code. I am using MS ADO 2.7 library to do this. Everytime I call the stored procedure it creates a new entry for the SP in the global sql area as if it is not using bind..

runtime error 3021 and user permissions - I have a VB6 application that uses ADO 2.7 to access an Access2000 database. I have found on Windows XP and 2000, that if the user is not part of the administrators group, they receive: "runtime error 3021. Either BOF or EOF is true, or the current ...

updatable ado-recordset - Hi, In the code below i have an updatable ado-recordset. However it is not working how i thought it would be. Maybe someone can help me out here? The global connection (Thanks to Brendan): Option Compare Database Option Explicit Public mconn As..

ADO Connection Access Database VB - I have been accessing a database on a local drive thru an ADO connection. The following is the code that I have been using. cnCejco.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Y:\Cejco.mdb;Persist Security Info=False" The problem is n...

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a datareport for example after 5 records printed. Thank you all
   Database Help (Home) -> Visual Basic -> ADO All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]