Results 1 to 4 of 4

Thread: CommandTimeOut ignored by oracle's OLEDB provider

  1. #1

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926

    CommandTimeOut ignored by oracle's OLEDB provider

    Sorry, I already posted this question in the Database forum, but I didn't get any reactions there, so I will try it here.

    I am using ADO 2.6 with oracle's OLEDB provider for oracle (not the microsoft one).
    Whatever value I set for the CommandTimeout property of the connection, or of a command object, no timeout occurs.

    It seems that the OLEDB provider did not implement the CommandTimeout property.

    When an update statement is executed, and runs against a lock, the statement waits untill the lock is resolved.

    I want to inform the user that the data is locked, and that he should try it at a later moment, but when the Execute method doesn't timeout, I can't do that.

    Does anybody know how to cancel the update statement when it times out waiting for a recordlock?
    Frans

  2. #2
    Fanatic Member ahara's Avatar
    Join Date
    Nov 2003
    Location
    Toronto
    Posts
    531
    It may be that the command timeout property is in fact supported by the provider, but not the interface you are using to access it - namely ADO. Have you looked into using OO4O instead? (Oracle Objects for OLE). I once had to go this route in an ASP app when dealing with inserting CLOBS...I still used ADO as well, although I did find it difficult getting info on OO4O....In case you have not been to Oracle's site...

    http://forums.oracle.com/forums/index.jsp?cat=48

    If you have not looked here yet, I strongly recommend signing up for a free account here - there is lots of docs (maybe too much!! )

    Hope that helps.
    "Knowledge is gained when different people look at the same information in different ways"

    - Louis Pasteur

  3. #3

    Thread Starter
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    I am afraid that switching from ADO to OO4O is not an option.
    I am talking about a conversion of 150 programs switching from a pervasive database to oracle, and all programs use the same way to access the database. The conversion is almost finished, but one program uses a pessimistic locking scheme, so it needs the timeout when it encounters a recordlock.

    You can understand that I don't want to start all over (there is no time for that anyway), and I don't want to break the convention for database access. So I am stuck to ADO.

    Are there other ways to tell oracle not to wait for a recordlock?


    P.S.
    I already tried searching the oracle site, but for some reason I can't find what i am looking for.
    Frans

  4. #4
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132
    Frans,
    can you create a stored proc to do updates instead of "sending" sql through ado interface and let the oracle worry about locking issue. You'll just check results and notify user of any issues ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width