-
Apr 27th, 2004, 06:31 AM
#1
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?
-
Apr 27th, 2004, 08:02 AM
#2
Fanatic Member
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
-
Apr 27th, 2004, 08:15 AM
#3
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.
-
Apr 27th, 2004, 08:55 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|