Hi

I have an ADO.NET 2.0 command object. i am trying to set the CommandTimeout
property.

Whatever value I try get ignored and the property remains on 0!

Any idea?

Thanks

RE: "IDBCommand.CommandTimeout" property won't change! by AmirTohidi

AmirTohidi
Mon Nov 05 01:15:01 PST 2007

Hi

Found out the cause of this. My command object is an OracleCommand and MSDN
says:

Unlike the Command object in the other .NET Framework data providers (SQL
Server, OLE DB, and ODBC), the OracleCommand object does not support a
CommandTimeout property. Setting a command timeout has no effect and the
value returned is always zero.

How very annoying ....



"Amir Tohidi" wrote:

> Hi
>
> I have an ADO.NET 2.0 command object. i am trying to set the CommandTimeout
> property.
>
> Whatever value I try get ignored and the property remains on 0!
>
> Any idea?
>
> Thanks

RE: "IDBCommand.CommandTimeout" property won't change! by AmirTohidi

AmirTohidi
Mon Nov 05 06:25:04 PST 2007

Hi

Since my last post I have tried the ODP.NET (Oracle's own data provider).

The good news is that it is possible to modify the CommandTimeout property.

The bad news is that my production code now won't compile because we have
LOBs and there are other data type related issues too.

So, is there any way I can use the Microsoft Oracle provider and still be
able to terminate a command's excecution? The only thing that comes to my
mind is to create a worker thread and to kill it after a certain time, but it
just doesn't feel right.

Thanks

"Amir Tohidi" wrote:

> Hi
>
> Found out the cause of this. My command object is an OracleCommand and MSDN
> says:
>
> Unlike the Command object in the other .NET Framework data providers (SQL
> Server, OLE DB, and ODBC), the OracleCommand object does not support a
> CommandTimeout property. Setting a command timeout has no effect and the
> value returned is always zero.
>
> How very annoying ....
>
>
>
> "Amir Tohidi" wrote:
>
> > Hi
> >
> > I have an ADO.NET 2.0 command object. i am trying to set the CommandTimeout
> > property.
> >
> > Whatever value I try get ignored and the property remains on 0!
> >
> > Any idea?
> >
> > Thanks